clairernovotny / ReferenceGenerator

MIT License
75 stars 13 forks source link

Support nuspec properties #24

Open cdmihai opened 8 years ago

cdmihai commented 8 years ago

I am updating MSBuild's nuspecs with properties, so that we can inject project to project versions: <dependency id="Microsoft.Build.Framework" version=$version$/>

This causes the reference generator task to fail:

16:37:22.020  10:8>Target "UpdateNuspecDependencies: (TargetId:72)" in file "C:\projects\msbuild\packages\NuSpec.ReferenceGenerator\1.4.2\build\dotnet\NuSpec.ReferenceGenerator.targets" from project "C:\projects\msbuild\src\XMakeBuildEngine\Microsoft.Build.csproj" (entry point):
                   Set Property: RefGenExecCmd="C:\projects\msbuild\packages\NuSpec.ReferenceGenerator\1.4.2\build\dotnet\..\..\tools\RefGen.exe" ".NETStandard,Version=v1.3;" netstandard1.3 "C:\projects\msbuild\src\nuget\Microsoft.Build.nuspec" "C:\projects\msbuild\src\XMakeBuildEngine\Microsoft.Build.csproj" "C:\projects\msbuild\bin\Debug-NetCore\Output\Microsoft.Build.dll"
                   Task "Exec" (TaskId:54)
                     Task Parameter:Command="C:\projects\msbuild\packages\NuSpec.ReferenceGenerator\1.4.2\build\dotnet\..\..\tools\RefGen.exe" ".NETStandard,Version=v1.3;" netstandard1.3 "C:\projects\msbuild\src\nuget\Microsoft.Build.nuspec" "C:\projects\msbuild\src\XMakeBuildEngine\Microsoft.Build.csproj" "C:\projects\msbuild\bin\Debug-NetCore\Output\Microsoft.Build.dll" (TaskId:54)
                     "C:\projects\msbuild\packages\NuSpec.ReferenceGenerator\1.4.2\build\dotnet\..\..\tools\RefGen.exe" ".NETStandard,Version=v1.3;" netstandard1.3 "C:\projects\msbuild\src\nuget\Microsoft.Build.nuspec" "C:\projects\msbuild\src\XMakeBuildEngine\Microsoft.Build.csproj" "C:\projects\msbuild\bin\Debug-NetCore\Output\Microsoft.Build.dll" (TaskId:54)
16:37:22.516   7:9>EXEC : error RG001: '$' is an unexpected token. The expected token is '"' or '''. Line 20, position 60. [C:\projects\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]

As a temporary workaround, I turned off the task :(

cdmihai commented 8 years ago

Depending on time, I might look into fixing this. If anyone gives me a head start, please say something in this issue.

BladeWise commented 7 years ago

Have you tried using <dependency id="Microsoft.Build.Framework" version="$version$"/> I doubt that token substitution can account for missing quotes.