c# – msbuild error: AssemblyRef does not contain a definition fir ‘Configuration’


I am ‘migrating’ a visual studio build to a batch script,
I have a one big project that has many dependencies,

i build my project with msbuild.exe using windows batch script,
the main project (client) has many dependencies.
i first build the dependencies, output them to their own directory (each one), and then copy the outputs into a folder called client,
Then, i build the main project (client) into the same directory.

msbuild command:

msbuild.exe <csproj_file> /p:SkipInvalidConfiguration=true /p:BuildProjectReferences=true /p:PublishDir=client_dir /p:OutDir=client_dir /p:OutputPath=client_dir /p:Platform="Any CPU" /p:Configuration=Release

enter image description here

I’m pretty stuck, and I’m the Devops that only migrates this build into batch and Jenkins.

It is fair to say that when building the project in Visual Studio, There are no errors at all.

Any thoughts?

Leave a Reply

Your email address will not be published. Required fields are marked *