Skip to content

Commit c08ac99

Browse files
authored
Merge pull request #325 from augustoproiete/warning-for-sdk-project
Display warning (instead of error) for SDK-style projects
2 parents c4c249a + 46831d5 commit c08ac99

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Package/ExcelDna.AddIn/build/ExcelDna.AddIn.targets

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@
6464
Target that checks if the project is not compatible with Excel-DNA
6565
-->
6666
<Target Name="ExcelDnaCheckPackageProjectStyle" BeforeTargets="CoreCompile">
67-
<Error Text="Excel-DNA is not compatible with projects that use NuGet `PackageReference`. Make sure you create a .NET Framework (Class Library) project and configure Visual Studio to use `packages.config`"
68-
Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' OR '$(RestoreProjectStyle)' == 'ProjectJson' OR '$(NuGetProjectStyle)' == 'PackageReference' " />
67+
<Warning Code="DNA1546"
68+
Text="Excel-DNA is not compatible with projects that use NuGet `PackageReference`. Make sure you create a .NET Framework (Class Library) project and configure Visual Studio to use `packages.config`"
69+
Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' OR '$(RestoreProjectStyle)' == 'ProjectJson' OR '$(NuGetProjectStyle)' == 'PackageReference' " />
6970
</Target>
7071

7172
<!--

0 commit comments

Comments
 (0)