Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Command Line building (old) web project

Command Line building (old) web project

Scheduled Pinned Locked Moved Web Development
csharpvisual-studioannouncementworkspacecom
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Super Lloyd
    wrote on last edited by
    #1

    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 tried msbuild

    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!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups