0

Our application is developed on .NET 6 framework and when we tried to use this command in a .bat file and ran on the local system, we are able to build solution and everything is working fine.

When we tried to run the same command file on a Windows server, it throws the error shown below:

%MSBUILDPATH% C:\source\EMS\EMS.sln /t:rebuild /p:Configuration=Release 

Error:

C:\Program Files\dotnet\sdk\6.0.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):
error NETSDK1004: Assets file 'C:\jkn\agent\9f8a2fcb\workspace\Local\deploy\deploy_localBuild_Package\Hierarchy\Core\obj\project.assets.json' not found.
Run a NuGet package restore to generate this file.

Then I tried to use this command but ended up getting another error:

%MSBUILDPATH% C:\source\EMS\EMS.sln /t:restore;rebuild /p:Configuration=Release 

Error:

(Restore target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(132,5):
error: 'v1.0.27' is not a valid version string. [C:\jkn\agent\9f8a2fcb\workspace\Local\deploy\deploy_localBuild_Package\EMS\EMS.sln]

We are using IBM RTC pipeline to deploy our project to server.

error : 'v1.0.27' is not a valid version string.

This the version number used for triggering build. Not sure where it's getting conflict

2
  • 2
    NuGet package versions strictly follow semantic versioning. The v-prefix is not allowed.
    – mspiller
    Commented Jun 28 at 9:55
  • @mspiller Thank you it worked with out mentioning letter 'V'. Please let me know if there a way to inform nuget to ignore v-prefix letter
    – AMDI
    Commented Jun 29 at 4:22

0

Browse other questions tagged or ask your own question.