You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to process a .NET 4.5.2 assembly using the latest source code and not making progress. I will report back as I try older versions to see how things worked back when #3 was hip.
I have downloaded Microsoft Visual Studio Express 2015 for Windows Desktop (most recent I could find free for commercial use). This was a bit tough to find since trying to get it from the official source pushes the Community Edition (possibly even the web installers?).
I then downloaded and installed .NET 4.6.2 and the .NET 4.6.2 targeting/dev pack. I made a bunch of changes to the App/packages.config files (no longer NuGet-ing most System stuff to avoid redirect causing errors), and pointed Refl.Asembly_Csc to v2. I can put this in a pull request if desired, as the actual LINQ rewriting appears to work, with the following logged:
Rewriting LINQ to procedural code...
Rewritten 156 LINQ queries in 135 methods as procedural code.
However, when it comes time to write the new output, I get the following error related to the v2 change (need to create a "dummyCompiler" where there are a bunch of commented out examples):
System.InvalidCastException: Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.CommandLine.Csc' to type 'Microsoft.CodeAnalysis.CommonCompiler'.
at lambda_method(Closure , Object , String )
at Microsoft.CodeAnalysis.CommonCompiler.RunCore(TextWriter consoleOutput, Object errorLogger, CancellationToken cancellationToken) in RoslynLinqRewrite\dotnet-compile-csc-linq-rewrite\CommonCompiler.cs:line 554
at Microsoft.CodeAnalysis.CommonCompiler.Run(TextWriter consoleOutput, CancellationToken cancellationToken) in RoslynLinqRewrite\dotnet-compile-csc-linq-rewrite\CommonCompiler.cs:line 318
at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.<>c__DisplayClass1_0.<Run>b__0(TextWriter tw) in RoslynLinqRewrite\dotnet-compile-csc-linq-rewrite\Csc.cs:line 32
at Microsoft.CodeAnalysis.CommandLine.ConsoleUtil.RunWithUtf8Output[T](Func`2 func) in RoslynLinqRewrite\dotnet-compile-csc-linq-rewrite\ConsoleUtil.cs:line 26
at Microsoft.CodeAnalysis.CommandLine.ConsoleUtil.RunWithUtf8Output[T](Boolean utf8Output, TextWriter textWriter, Func`2 func) in RoslynLinqRewrite\dotnet-compile-csc-linq-rewrite\ConsoleUtil.cs:line 51
at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.Run(String[] args, BuildPaths buildPaths, TextWriter textWriter, IAnalyzerAssemblyLoader analyzerLoader) in RoslynLinqRewrite\dotnet-compile-csc-linq-rewrite\Csc.cs:line 32
at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.RunLocalCompilation(String[] arguments, BuildPaths buildPaths, TextWriter textWriter) in RoslynLinqRewrite\dotnet-compile-csc-linq-rewrite\DesktopBuildClient.cs:line 44
at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation(IEnumerable`1 originalArguments, BuildPaths buildPaths, TextWriter textWriter) in RoslynLinqRewrite\dotnet-compile-csc-linq-rewrite\BuildClient.cs:line 98
at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.Run(IEnumerable`1 arguments, IEnumerable`1 extraArguments, RequestLanguage language, CompileFunc compileFunc, IAnalyzerAssemblyLoader analyzerAssemblyLoader) in RoslynLinqRewrite\dotnet-compile-csc-linq-rewrite\DesktopBuildClient.cs:line 39
at Microsoft.CodeAnalysis.CSharp.CommandLine.ProgramLinqRewrite.MainInternal(String[] args) in RoslynLinqRewrite\dotnet-compile-csc-linq-rewrite\CscProgram.cs:line 16
at Shaman.Roslyn.LinqRewrite.Program.MainInternal(String[] args) in RoslynLinqRewrite\RoslynLinqRewrite\Program.cs:line 94
at Shaman.Roslyn.LinqRewrite.Program.Main(String[] args) in RoslynLinqRewrite\RoslynLinqRewrite\Program.cs:line 44
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.CSharp.Core.targets(67,5): error MSB6006: "csc.exe" exited with code 1.
PS. When using msbuild per #3 to get the stack traces, searching for Task "csc" jumps to the useful info. Simplifying this process would make troubleshooting a lot easier.
The text was updated successfully, but these errors were encountered:
I am trying to process a .NET 4.5.2 assembly using the latest source code and not making progress. I will report back as I try older versions to see how things worked back when #3 was hip.
I have downloaded Microsoft Visual Studio Express 2015 for Windows Desktop (most recent I could find free for commercial use). This was a bit tough to find since trying to get it from the official source pushes the Community Edition (possibly even the web installers?).
I then downloaded and installed .NET 4.6.2 and the .NET 4.6.2 targeting/dev pack. I made a bunch of changes to the App/packages.config files (no longer NuGet-ing most System stuff to avoid redirect causing errors), and pointed Refl.Asembly_Csc to v2. I can put this in a pull request if desired, as the actual LINQ rewriting appears to work, with the following logged:
However, when it comes time to write the new output, I get the following error related to the v2 change (need to create a "dummyCompiler" where there are a bunch of commented out examples):
PS. When using msbuild per #3 to get the stack traces, searching for Task "csc" jumps to the useful info. Simplifying this process would make troubleshooting a lot easier.
The text was updated successfully, but these errors were encountered: