Skip to content
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

Open
jessejiang0214 opened this issue Sep 4, 2018 · 4 comments
Open

[Cauldron.Interception.Fody] build error on Mac #69

jessejiang0214 opened this issue Sep 4, 2018 · 4 comments
Assignees

Comments

@jessejiang0214
Copy link

jessejiang0214 commented Sep 4, 2018

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.IEnumerable1[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+SelectEnumerableIterator2[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:131
MSBUILD : error : at System.Collections.Generic.List1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable1[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:744
MSBUILD : error : at System.Collections.Generic.List1[T].AddRange (System.Collections.Generic.IEnumerable1[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:255
MSBUILD : 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

@reflection-emit
Copy link
Collaborator

reflection-emit commented Sep 6, 2018 via email

@jessejiang0214
Copy link
Author

I think you can use Roslyn.

@reflection-emit
Copy link
Collaborator

reflection-emit commented Sep 7, 2018 via email

@reflection-emit
Copy link
Collaborator

I am switching the script engine to CSScript… http://www.csscript.net/
This should solve the problem. But it also means no C# 6 features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants