codeMetis
codeMetis

Reputation: 430

Visual studio builds but msbuild does not.

I have looked at many of the similar questions, none have answered my problem thus far.

I can't build any of the libraries/applications in the project with msbuild. There are 0 errors, 0 warnings, 0 messages in visual studio.

Even when I isolate the library, none of them compile. There are 68 errors for the core library that is not dependant on anything except two nuget packages. Some of the errors include:

CS1003 Syntax error, "," expected and CS1525 Invalid expression term 'double'. Both On a line like this: Function(param1, param2, out double bla, out double blu);

CS1003 Syntax error, '[' expected on a line like this: void FuncPointer() { Obj.Function(); }

And many other obviously wrong errors but not on every line. Mostly "," expected errors.

Upvotes: 1

Views: 1150

Answers (1)

codeMetis
codeMetis

Reputation: 430

Turns out, that something had caused Illegal characters in a Nuget.config file in AppData. But the project was still getting compiled into a nuget package in visual studio, which is why this went unnoticed. All the packages were already installed. I introduced a local nuget.config in the repo to prevent that error, and the rest of the build was fine in msbuild.exe.

Upvotes: 1

Related Questions