Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Nuget refuses to build with '=' property syntax

$
0
0

I have the latest version of nuget.exe

\DocumentTreeController.cs(274,50): error CS1519: Invalid token '=' in class, struct, or interface member declaration

Seems to be the default syntax for a property

public string Filename { get; set; } = "Document1";

The only think I really changed was the project went from .net 4.7.2 -> 4.8

Builds fine in Visual Studio, but here's the nuget command I'm using

"C:\Program Files (x86)\NuGet\nuget" pack myproject.csproj -Build -MSBuildVersion 4 -Properties Configuration=Release

Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>