Command Line building (old) web project
-
I am rtying to setup an Azure Pipeline to build an old Web project. That uses both .NET v4.8 and .NETstandard 2.0 libraries.
dotnet publish
doesn't support that project. I am unsure about migrating the project to new project format... I triedmsbuild
msbuild C:\...\Webproject.csproj -m -t:Rebuild -p:Configuration=Release;TargetFrameworkVersion=v4.8;OutputPath="c:\temp\webproj"
But then I got strange and puzzling error like:
"C:\...\Webproject.csproj" (Rebuild target) (1) ->
(_GetProjectReferenceTargetFrameworkProperties target) ->
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(1842,5):
error : Project '..\OtherProject\OtherProject.csproj' targets 'netstandard2.0'.
It cannot be referenced by a project that targets '.NETFramework,Version=v4.8'.Never mind, solved it. Removed the target framework from command line! :) (it's in each .csproj anyway)
A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!