Closed mellinoe closed 5 years ago
I'm targeting something other than netcoreapp and ran into the same thing - got things working, made a change to the generator, triggered the GenerateCodeFromAttributes
target, now all of a sudden my Generator is no longer being instantiated and my generated files are empty apart from using statements.
Anyone know what's causing this? It's blocking me from successfully upgrading to netstandard 2.0.
To clarify, are you injecting code into a netstandard2.0 project, or are you compiling your code generator itself to netstandard2.0?
The code generation stops when compiling my code generator to netstandard2.0 instead of netstandard1.5.
Before:
dotnet codegen ... -r C:\Src\LionFire\StateMachines.Class\bin\LionFire.StateMachines.Class.Generation\Release\netstandard1.5\LionFire.StateMachines.Class.Generation.dll ...
.
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
using LionFire.Assets;
using LionFire.Execution.Executables;
using LionFire.StateMachines.Class;
namespace LionFire.Execution.Hosts
{
partial class AssetsHost
{
//
// Generated on 2017-10-19 10:41:35 AM
//
// BaseDir: C:\Users\ja\.nuget\packages\.tools\dotnet-codegen\0.4.11\netcoreapp2.0
// Compilation:
// - Source module name codegen.dll
// - source module locations: SourceFile(Execution\Hosts\AssetsHost.cs[2..998))
// #r "C:\Src\Core\bin\LionFire.Base\Debug\netstandard2.0\LionFire.Base.dll" (Already loaded)
// #r "C:\Src\Core\bin\LionFire.Core\Debug\netstandard2.0\LionFire.Core.dll" (Already loaded)
// #r "C:\Src\Core\bin\LionFire.Execution.Abstractions\Debug\netstandard2.0\LionFire.Execution.Abstractions.dll" (Already loaded)
// #r "C:\Src\Core\bin\LionFire.Execution\Debug\netstandard2.0\LionFire.Execution.dll"
// #r "C:\Src\Core\bin\LionFire.Referencing.Abstractions\Debug\netstandard2.0\LionFire.Referencing.Abstractions.dll" (Already loaded)
// #r "C:\Src\LionFire\StateMachines.Class\bin\LionFire.StateMachines.Class.Generation\Release\netstandard1.5\LionFire.StateMachines.Class.Abstractions.dll"
// #r "C:\Src\LionFire\StateMachines.Class\bin\LionFire.StateMachines.Class.Generation\Release\netstandard1.5\LionFire.StateMachines.Class.dll"
// #r "C:\Src\LionFire\StateMachines.Class\bin\LionFire.StateMachines.Class.Generation\Release\netstandard1.5\LionFire.StateMachines.Class.Generation.dll"
// #r "C:\Src\Core\bin\LionFire.Structures\Debug\netstandard2.0\LionFire.Structures.dll" (Already loaded)
//
// ...
//
}
}
After:
dotnet codegen ... -r C:\Src\LionFire\StateMachines.Class\bin\LionFire.StateMachines.Class.Generation\Release\netstandard2.0\LionFire.StateMachines.Class.Generation.dll ...
.
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
using LionFire.Assets;
using LionFire.Execution.Executables;
using LionFire.StateMachines.Class;
Maybe this is related: I discovered that the massive command line seems to be having issues loading all of the referenced DLLs -- looks like it may be referencing every single DLL in netstandard2.0.
I had to trim this down in order to get it to run:
dotnet codegen -r C:\Users\ja\.nuget\packages\codegeneration.roslyn.attributes\0.4.11\lib\netstandard1.0\CodeGeneration.Roslyn.Attributes.dll -r C:\Users\ja\.nuget\packages\codegeneration.roslyn\0.4.11\lib\netstandard1.5\CodeGeneration.Roslyn.dll -r C:\Src\Core\bin\LionFire.Base\Debug\netstandard2.0\LionFire.Base.dll -r C:\Src\Core\bin\LionFire.Core\Debug\netstandard2.0\LionFire.Core.dll -r C:\Src\Core\bin\LionFire.Execution.Abstractions\Debug\netstandard2.0\LionFire.Execution.Abstractions.dll -r C:\Src\Core\bin\LionFire.Execution\Debug\netstandard2.0\LionFire.Execution.dll -r C:\Src\Core\bin\LionFire.Referencing.Abstractions\Debug\netstandard2.0\LionFire.Referencing.Abstractions.dll -r C:\Users\ja\.nuget\packages\lionfire.statemachines.class.abstractions\2.0.0\lib\netstandard1.5\LionFire.StateMachines.Class.Abstractions.dll -r C:\Users\ja\.nuget\packages\lionfire.statemachines.class\2.0.0\lib\netstandard1.5\LionFire.StateMachines.Class.dll -r C:\Users\ja\.nuget\packages\lionfire.statemachines.class.generation\2.0.0\lib\netstandard1.5\LionFire.StateMachines.Class.Generation.dll -r C:\Src\Core\bin\LionFire.Structures\Debug\netstandard2.0\LionFire.Structures.dll -r C:\Users\ja\.nuget\packages\microsoft.codeanalysis.csharp\2.2.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll -r C:\Users\ja\.nuget\packages\microsoft.codeanalysis.common\2.2.0\lib\netstandard1.3\Microsoft.CodeAnalysis.dll -r C:\Users\ja\.nuget\packages\microsoft.extensions.dependencyinjection.abstractions\2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll -r C:\Users\ja\.nuget\packages\microsoft.extensions.logging.abstractions\2.0.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\Microsoft.Win32.Primitives.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\mscorlib.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\netstandard.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.AppContext.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Collections.Concurrent.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Collections.dll -r C:\Users\ja\.nuget\packages\system.collections.immutable\1.4.0\lib\netstandard2.0\System.Collections.Immutable.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Collections.NonGeneric.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Collections.Specialized.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.ComponentModel.Composition.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.ComponentModel.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.ComponentModel.EventBasedAsync.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.ComponentModel.Primitives.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.ComponentModel.TypeConverter.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Console.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Core.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Data.Common.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Data.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Diagnostics.Contracts.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Diagnostics.Debug.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Diagnostics.FileVersionInfo.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Diagnostics.Process.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Diagnostics.StackTrace.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Diagnostics.TextWriterTraceListener.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Diagnostics.Tools.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Diagnostics.TraceSource.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Diagnostics.Tracing.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Drawing.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Drawing.Primitives.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Dynamic.Runtime.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Globalization.Calendars.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Globalization.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Globalization.Extensions.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.Compression.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.Compression.FileSystem.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.Compression.ZipFile.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.FileSystem.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.FileSystem.DriveInfo.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.FileSystem.Primitives.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.FileSystem.Watcher.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.IsolatedStorage.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.MemoryMappedFiles.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.Pipes.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.IO.UnmanagedMemoryStream.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Linq.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Linq.Expressions.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Linq.Parallel.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Linq.Queryable.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.Http.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.NameResolution.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.NetworkInformation.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.Ping.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.Primitives.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.Requests.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.Security.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.Sockets.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.WebHeaderCollection.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.WebSockets.Client.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Net.WebSockets.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Numerics.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.ObjectModel.dll -r C:\Users\ja\.nuget\packages\system.reactive.core\3.1.1\lib\netstandard1.3\System.Reactive.Core.dll -r C:\Users\ja\.nuget\packages\system.reactive.interfaces\3.1.1\lib\netstandard1.0\System.Reactive.Interfaces.dll -r C:\Users\ja\.nuget\packages\system.reactive.linq\3.1.1\lib\netstandard1.3\System.Reactive.Linq.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Reflection.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Reflection.Extensions.dll -r C:\Users\ja\.nuget\packages\system.reflection.metadata\1.4.2\lib\netstandard1.1\System.Reflection.Metadata.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Reflection.Primitives.dll -r C:\Users\ja\.nuget\packages\system.reflection.typeextensions\4.4.0\ref\netstandard2.0\System.Reflection.TypeExtensions.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Resources.Reader.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Resources.ResourceManager.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Resources.Writer.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.CompilerServices.VisualC.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.Extensions.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.Handles.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.InteropServices.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.InteropServices.RuntimeInformation.dll -r C:\Users\ja\.nuget\packages\system.runtime.interopservices.windowsruntime\4.0.1\ref\netstandard1.0\System.Runtime.InteropServices.WindowsRuntime.dll -r C:\Users\ja\.nuget\packages\system.runtime.loader\4.3.0\ref\netstandard1.5\System.Runtime.Loader.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.Numerics.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.Serialization.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.Serialization.Formatters.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.Serialization.Json.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.Serialization.Primitives.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Runtime.Serialization.Xml.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Security.Claims.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Security.Cryptography.Algorithms.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Security.Cryptography.Csp.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Security.Cryptography.Encoding.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Security.Cryptography.Primitives.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Security.Cryptography.X509Certificates.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Security.Principal.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Security.SecureString.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.ServiceModel.Web.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Text.Encoding.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Text.Encoding.Extensions.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Text.RegularExpressions.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Threading.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Threading.Overlapped.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Threading.Tasks.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Threading.Tasks.Parallel.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Threading.Thread.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Threading.ThreadPool.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Threading.Timer.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Transactions.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.ValueTuple.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Web.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Windows.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Xml.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Xml.Linq.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Xml.ReaderWriter.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Xml.Serialization.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Xml.XDocument.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Xml.XmlDocument.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Xml.XmlSerializer.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Xml.XPath.dll -r C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Xml.XPath.XDocument.dll -r C:\Users\ja\.nuget\packages\validation\2.4.13\lib\netstandard1.3\Validation.dll --out C:\Src\Core\src\..\obj\LionFire.Framework\Debug\netstandard2.0\ --generatedFilesList C:\Src\Core\src\..\obj\LionFire.Framework\Debug\netstandard2.0\xoe14ky0.xsh -- Execution\Hosts\AssetsHost.cs
I get this exception at the command line:
Unhandled Exception: System.IO.FileNotFoundException: Could not find a part of the path 'C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\rf\System.Net.Sockets.dll'. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\ja\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\rf\System.Net.Sockets.dll'.
at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent)
at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at Roslyn.Utilities.FileUtilities.OpenFileStream(String path)
--- End of inner exception stack trace ---
at Roslyn.Utilities.FileUtilities.OpenFileStream(String path)
at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation)
at CodeGeneration.Roslyn.CompilationGenerator.<>c.<CreateCompilation>b__33_0(String p)
at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
at Microsoft.CodeAnalysis.Compilation.ValidateReferences[T](IEnumerable`1 references)
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.WithReferences(IEnumerable`1 references)
at CodeGeneration.Roslyn.CompilationGenerator.CreateCompilation(CancellationToken cancellationToken)
at CodeGeneration.Roslyn.CompilationGenerator.Generate(IProgress`1 progress, CancellationToken cancellationToken)
at CodeGeneration.Roslyn.Generate.Program.Main(String[] args)
Note the "\rf\" in the path instead of ref -- not sure what's going on there.
And if I remove a few unneeded DLLs before System.Net.Sockets, then another DLL fails.
Closing as deprecated. Project went through major refactor, documentation was updated.
I'm able to get the example to work as shown (targeting netstandard1.5), but if I retarget it to netstandard2.0 or netcoreapp2.0, it no longer seem to work. Poking around at some of the intermediate files, it looks like the temporary .cs file is still generated, but it only has the using statements in it -- no original or modified code (if that makes sense). As a consequence, the output assembly doesn't have the suffixed type in it.