after manual project build from command line, now error MSB3541 in VS build, looks to be an invalid file path issue

Greg Harris 0 Reputation points
2023-05-12T01:50:27.5666667+00:00

While doing a build from Visual Studio, I am getting error MSB3541

With description: Files has invalid value "(dir path)\Build_20230511_1136 --configuration Release -p:Version=1.2.3.4\DocumentFormat.OpenXml.dll". The given path's format is not supported.

Normally I do my builds from inside Visual Studio, yesterday, I was doing command line builds in an attempt to automate my builds.

Today, I go back to doing a build from within Visual Studio, and I am getting error MSB3541

The (dir path) shown was one of my manual builds, but, it looks like it has got some extra detail in there which has nothing to do with the path.

I have now deleted all of my manual builds.

I have done the following to attempt to fix this...

  • Reboot VS
  • Reboot system (Windows 10)
  • Delete all of my manual builds
  • Rename/remove C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets
  • Delete C:\Users\greg\AppData\Local\Temp\TFSTemp and contents

I am not sure what to try next #$%^&*!

Looking for recommendations, I think I have done somthing stupid, just no idea what????

I am using Microsoft Visual Studio Community 2022

Version 17.5.5

VisualStudio.17.Release/17.5.5+33627.172

Microsoft .NET Framework

Version 4.8.04084

The code is C#, win forms app

Developer technologies | Windows Forms
Developer technologies | Visual Studio | Other
Community Center | Not monitored
{count} votes

2 answers

Sort by: Most helpful
  1. Greg Harris 0 Reputation points
    2023-05-12T08:21:29.3133333+00:00

    FIXED - Thank you Viorel, you prompted me to do what was needed :-)

    Great question, I should have tried that - Yes it does compile other solutions okay.

    So the problem is specific to this solution.

    As to manual builds... I will reword from: Normally I do my builds from inside Visual Studio, yesterday, I was doing command line builds in an attempt to automate my builds.

    To: Normally I do my builds from inside Visual Studio, yesterday, I was doing command line MANUAL builds in an attempt to automate my builds.

    I should have just said command line builds :-)

    Fix: I have deleted all files in the Bin and Obj folders in each of the solutions, rebuild, problem fixed :-)

    Thanks for your help :-)

    0 comments No comments

  2. Greg Harris 0 Reputation points
    2023-05-12T08:30:27.48+00:00

    And repeated manual command line build, Visual Studio build then ran okay :-)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.