StackExchange / StackExchange.Precompilation

Roslyn based csc.exe and aspnet_compiler.exe replacement with metaprogramming hooks for ASP.NET MVC projects from the pre-DNX era
MIT License
155 stars 37 forks source link

New csproj #37

Open DaniilSokolyuk opened 6 years ago

DaniilSokolyuk commented 6 years ago

Hi! We are migrated our projects to new csproj format (like this https://github.com/MiniProfiler/dotnet/blob/master/samples/Samples.Mvc5/Samples.Mvc5.csproj https://github.com/NickCraver/StackExchange.Exceptional/blob/master/samples/Samples.MVC5/Samples.MVC5.csproj) but the compilation does not work anymore

Thousands errors like this

C:\Work\....cs(104,22): error CS0246: The type or namespace name 'xxx' could not be found (are you missing a using directive or an assembly reference?)
m0sa commented 6 years ago

Can you please provide more details on how exactly you're building the project / solution, and what types are missing?

Note that the test projects in the master branch is also using <PackageReference>. I did not attempt to make the build work with dotnet build / dotnet msbuild, though.

m0sa commented 6 years ago

Also the examples above are not supported by the tooling, see - https://github.com/dotnet/project-system/issues/2670

DaniilSokolyuk commented 6 years ago

Not supported, but works :)

DaniilSokolyuk commented 6 years ago

@m0sa Sorry, i found problem Some *.cs files were encoded in 'windows-1251', i resave all files in utf8 and everything is working now

but dotnet build, and vs studio build can build with any encoding