AMDI
AMDI

Reputation: 973

Facing issue using Msbuild for building .NET Core project on Windows 2012 server

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

Upvotes: 0

Views: 29

Answers (0)

Related Questions