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

Works compiling from VisualStudio, fails compiling through dotnet command #80

Open
thewazaa opened this issue Feb 6, 2019 · 3 comments

Comments

@thewazaa
Copy link

thewazaa commented Feb 6, 2019

I have problems compiling a project using these weavers from command line:

With visual studio:

1>Target FodyTarget:
1>    Fody: Fody (version 3.2.10.0) Executing
1>    Fody: ProjectDirectory: 'C:\Repos\PlatformMicroServicePrototype\Platform\Logger'.
1>    Fody: AssemblyFile: 'C:\Repos\PlatformMicroServicePrototype\Platform\Logger\obj\Debug\netcoreapp2.2\Logger.dll'
1>    Fody: Found path to weavers file 'C:\Repos\PlatformMicroServicePrototype\Platform\Logger\FodyWeavers.xml'.
1>    Fody: SolutionDirectory path is 'C:\Repos\PlatformMicroServicePrototype\'
1>    Fody: Finding weavers
1>    Fody:   Scanning SolutionDir/Tools directory convention: 'C:\Repos\PlatformMicroServicePrototype\Tools'.
1>    Fody: No Weaver project file found.
1>    Fody: FindAddinDirectories (Legacy):
1>    Fody:   Skipped directory from Nuget Config since it could not be derived.
1>    Fody:   Scanning the MsBuildThisFileDirectory parent: C:\Users\user\.nuget\packages\'.
1>    Fody:   Scanning NuGetPackageRoot 'C:\Users\user\.nuget\packages\'.
1>    Fody: Searched for 'Cauldron.Interception'. Found: C:\Users\josep.pons.NEOIT\.nuget\packages\cauldron.interception.fody\3.2.3\netclassicweaver\Cauldron.Interception.Fody.dll

With command line: "dotnet build -v n"

 3>FodyTarget:
           Fody: SolutionDirectory path is 'C:\Repos\PlatformMicroServicePrototype\'
           Fody: Finding weavers
           Fody:   Scanning SolutionDir/Tools directory convention: 'C:\Repos\PlatformMicroServicePrototype\Tools'.
           Fody: No Weaver project file found.
           Fody: FindAddinDirectories (Legacy):
           Fody:   Skipped directory from Nuget Config since it could not be derived.
           Fody:   Scanning the MsBuildThisFileDirectory parent: C:\Users\user\.nuget\packages\'.
           Fody:   Scanning NuGetPackageRoot 'C:\Users\user\.nuget\packages\'.
     3>MSBUILD : error : Fody: Could not find a weaver named 'Cauldron.Interception'. [C:\Repos\PlatformMicroServicePrototype\Platform\Logger\Logger.csproj]
MSBUILD : error : If you have nuget package restore turned on you probably need to do a build to download the weavers. [C:\Repos\PlatformMicroServicePrototype\Platform\Logger\Logger.csproj]
MSBUILD : error : Alternatively you may have added a weaver to your 'FodyWeavers.xml' and forgot to add the appropriate NuGet package. [C:\Repos\PlatformMicroServicePrototype\Platform\Logger\Logger.csproj]
MSBUILD : error : This url may provide more information http://nuget.org/packages/Cauldron.Interception.Fody/ . [C:\Repos\PlatformMicroServicePrototype\Platform\Logger\Logger.csproj]
           Fody:   Finished Fody 338ms.

I'm quite lost regarding why this happens. The project is in netcore2.2, but I don't think it really matters cause with Visual Studio everything works.

@SirDragonClaw
Copy link

I am also having this issue, I have confirmed that it happens both on the latest DotNetCore on windows and also DotNetCore 2.2 on linux.

The project compiles and correctly weaves on Visual Studio 2019.

This is a blocking issue.

Error when running dotnet build is:
MSBUILD : error : Fody: Could not find a weaver named 'Cauldron.Interception'

@htxryan
Copy link

htxryan commented Aug 12, 2019

Any update on this? I'm facing this same blocking issue. I'm able to restore + build + run from Visual Studio 2017, but the 'dotnet build' command is failing.

"dotnet build" output:

C:\[project path]>dotnet build
Microsoft (R) Build Engine version 16.0.450+ga8dc7f1d34 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 88.51 ms for C:\<target_project>.csproj.
    Fody: Fody (version 3.2.10.0) Executing
MSBUILD : error : Fody: Could not find a weaver named 'Cauldron.Interception'. [<target_project>.csproj]
MSBUILD : error : If you have nuget package restore turned on you probably need to do a build to download the weavers. [<target_project>.csproj]
MSBUILD : error : Alternatively you may have added a weaver to your 'FodyWeavers.xml' and forgot to add the appropriate NuGet package. [<target_project>.csproj]
MSBUILD : error : This url may provide more information http://nuget.org/packages/Cauldron.Interception.Fody/ . [<target_project>.csproj]
    Fody:   Finished Fody 136ms.

Build FAILED.

FodyWeavers.xml:

<Weavers VerifyAssembly="True">
  <Cauldron.Interception>
    <OnlyIncludeAssemblies>
      MyProject.
    </OnlyIncludeAssemblies>
  </Cauldron.Interception>
</Weavers>

I've got the following NuGet packages referenced in this project:

    <PackageReference Include="Capgemini.Cauldron" Version="3.2.3" />
    <PackageReference Include="Capgemini.Cauldron.Interceptors" Version="3.2.3" />
    <PackageReference Include="Cauldron.BasicInterceptors" Version="3.2.3" />
    <PackageReference Include="Cauldron.Interception.Fody" Version="3.2.3" />

@Arlodotexe
Copy link

Related issue #84

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

No branches or pull requests

4 participants