forked from reflection-emit/Cauldron
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cauldron.Interception.Fody] build error on Mac #69
Labels
Comments
Hi,
The scripting feature is actually a Windows only thing.
But I think this is a good opportunity to make this also works on Mac.
I need your help here...
If you type in csc in the console what version of the compiler is executed?
…________________________________
Firma: Capgemini Deutschland GmbH
Aufsichtsratsvorsitzender: Antonio Schnieder • Geschäftsführer: Dr. Michael Schulte (Sprecher) • Jost Förster • Dr. Peter Lempp • Dr. Volkmar Varnhagen
Amtsgericht Berlin-Charlottenburg, HRB 98814
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
|
I think you can use Roslyn. |
Yes that is a good idea, but it does not work. During build there is already a version of the roslyn library that is loaded. Referencing another version in the Fody extension causes a loading exception. So I have to actually reference exactly the same version. Thats means that if the roslyn version in VS is updated my Fody extension won’t work anymore.
I already tried with CSScript which has 3 different options Mono, classic and Roslyn.
The roslyn does not work because of the reason above. The mono version was not able to compile my lambda-heavy scripts.
The classic one seems to be an old version of csc.
I also tried dotnet script, but since it is using roslyn I ran into the same problem described above.
Another option I haven’t looked into is dynamically loading the roslyn library.
…________________________________
Firma: Capgemini Deutschland GmbH
Aufsichtsratsvorsitzender: Antonio Schnieder • Geschäftsführer: Dr. Michael Schulte (Sprecher) • Jost Förster • Dr. Peter Lempp • Dr. Volkmar Varnhagen
Amtsgericht Berlin-Charlottenburg, HRB 98814
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
|
I am switching the script engine to CSScript… http://www.csscript.net/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I used VS for mac to build a custom interception project then I got this error
Fody/Cauldron.Interception: Cauldron Interception v3.0.0.35
Fody/Cauldron.Interception: ----- Implementing decorator interceptors took 12.0541ms -----
Fody/Cauldron.Interception: Compiling custom interceptor: AddMethodsToClass.csx
Fody/Cauldron.Interception:
Fody/Cauldron.Interception: Cannot open assembly '/packages/cauldron.interception.fody/3.0.35-beta/netclassicweaver/csccsc.exe': No such file or directory.
Fody/Cauldron.Interception:
Fody/Cauldron.Interception: ----- Implementing custom interceptors interceptors took 965.3508ms -----
MSBUILD : error : Fody: An unhandled exception occurred:
MSBUILD : error : Exception:
MSBUILD : error : Failed to execute weaver packages/cauldron.interception.fody/3.0.35-beta/netclassicweaver/Cauldron.Interception.Fody.dll
MSBUILD : error : Type:
MSBUILD : error : System.Exception
MSBUILD : error : StackTrace:
MSBUILD : error : at InnerWeaver.ExecuteWeavers () [0x0007a] in C:\projects\fody\FodyIsolated\InnerWeaver.cs:214
MSBUILD : error : at InnerWeaver.Execute () [0x0009f] in C:\projects\fody\FodyIsolated\InnerWeaver.cs:109
MSBUILD : error : Source:
MSBUILD : error : FodyIsolated
MSBUILD : error : TargetSite:
MSBUILD : error : Void ExecuteWeavers()
MSBUILD : error : An error has occured while compiling '/test/Tests/AddMethodsToClass-3.0.0.35/74218D1A7DE4A5A65FB74A8519C66DD1.cs'
MSBUILD : error : Type:
MSBUILD : error : System.Exception
MSBUILD : error : StackTrace:
MSBUILD : error : at Cauldron.Interception.Fody.ModuleWeaver.CompileScript (System.String compiler, System.String path, System.Collections.Generic.IEnumerable
1[T] references) [0x0014b] in <b5e227d79a1b4e418b622e943b76b951>:0 MSBUILD : error : at Cauldron.Interception.Fody.ModuleWeaver.LoadScript (System.String path) [0x00042] in <b5e227d79a1b4e418b622e943b76b951>:0 MSBUILD : error : at Cauldron.Interception.Fody.ModuleWeaver.<ExecuteInterceptionScripts>b__20_2 (System.String x) [0x00000] in <b5e227d79a1b4e418b622e943b76b951>:0 MSBUILD : error : at System.Linq.Enumerable+SelectEnumerableIterator
2[TSource,TResult].MoveNext () [0x00036] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/Select.cs:131MSBUILD : error : at System.Collections.Generic.List
1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable
1[T] collection) [0x000ea] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/collections/generic/list.cs:744MSBUILD : error : at System.Collections.Generic.List
1[T].AddRange (System.Collections.Generic.IEnumerable
1[T] collection) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/collections/generic/list.cs:255MSBUILD : error : at Cauldron.Interception.Fody.ModuleWeaver.ExecuteInterceptionScripts (Cauldron.Interception.Cecilator.Builder builder) [0x0012a] in :0
MSBUILD : error : at Cauldron.Interception.Fody.ModuleWeaver.OnExecute () [0x0005f] in :0
MSBUILD : error : at Cauldron.Interception.Cecilator.WeaverBase.Execute () [0x0007d] in <9caaf1c82dd6419e9b178532dfa71948>:0
MSBUILD : error : at InnerWeaver.ExecuteWeavers () [0x0006b] in C:\projects\fody\FodyIsolated\InnerWeaver.cs:210
MSBUILD : error : Source:
MSBUILD : error : Cauldron.Interception.Fody
MSBUILD : error : TargetSite:
MSBUILD : error : System.String CompileScript(System.String, System.String, System.Collections.Generic.IEnumerable`1[System.String])
MSBUILD : error :
Fody: Finished Fody 4698ms.
Done building target "FodyTarget" in project "Tests.csproj" -- FAILED.
I think something wrong with this line cscPath = Path.Combine(this.AddinDirectoryPath, "csc\csc.exe");
https://github.com/Capgemini/Cauldron/blob/master/Fody/Cauldron.Interception.Fody/ModuleWeaver_Scripting.cs
The text was updated successfully, but these errors were encountered: