-
Notifications
You must be signed in to change notification settings - Fork 96
Update to new MSBuild format in project files, for Netstandard2.0 #169
Conversation
tb.CreateType(); | ||
ab.SetEntryPoint (fb, PEFileKinds.WindowApplication); | ||
ab.Save (file); | ||
return fullFile; | ||
tb.CreateTypeInfo(); | ||
return tb.FullName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this ?
Will the change do the same. I have no idea what it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's basically the path to the executable that would be written by the above code.
That means the code that does the running of the saved assembly:
https://github.com/mono/mono-addins/pull/169/files#diff-c7001386acf361c301b4a1e3d0da4fb27fb5e7d6396ba081583caf2e34b805fbR74
Should be modified to handle this scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have it running and is working in my case. When is this used ?
I'm not sure if that is possible in netstandard !!
I will have to investigate more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anyone who have an idea, on how to solve this in netstandard ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikkeljohnsen one solution would be to make a separate project that contains the emitted code and run it from an assembly on disk that's shipped with Mono.Addins. In example, Mono.Addins.Setup.exe
could be the one, it calls SetupProcess.Main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original code does not seem to work. The generated exe needs to have the Mono.Addins.dll copied into its directory otherwise it does not work.
Also not sure why an exe needs to be generated on the fly here - maybe I am missing something. Seems like a pre-built executable could be used since all the generated code does it call into SetupProcess.Main. Which currently does not work since SetupProcess is an internal class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had an attempt I did not get to test here:
#149
It used IVT to avoid that issue: https://github.com/mono/mono-addins/pull/149/files#diff-1c2789e6e0ffa1098ceee92df92b1714007f0e81372b351d39fa0465eca9737eR26
…project file. When reverted back to internal on functions/classes
…References.cs. Removed dependencies for Mono.Addins.MSBuild on Mono.Addins.Setup. Not needed
@@ -52,5 +49,4 @@ | |||
<Name>SecondAssembly</Name> | |||
</ProjectReference> | |||
</ItemGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To get this to compile I had to add some remove items. Otherwise I get errors about duplicate assembly attributes.
<ItemGroup>
<None Remove="OptionalModule\**" />
<None Remove="SecondAssembly\**" />
<Compile Remove="OptionalModule\**" />
<Compile Remove="SecondAssembly\**" />
</ItemGroup>
OK - took this branch and added some extra changes on another branch/PR - #171 - mainly wanted to get the tests passing. Still some things that I think need looking at. Added as a TODO on the other PR. |
Updating project files for the new MSBuild format.
Changing to build for netstandard2.0.
Since netstandard do not af Domains I had to remove that. Also had to change for TypeBuilder. Not sure what that does.