Building BuzzGUI
Building BuzzGUI
I can't build BuzzGUI anymore. The BuzzGUI.MachineView project wouldn't load because of some dependencies related to "Fody". I found Fody on GitHub but I can't figure out how to install it properly to get the project to build. What do I need to do?
Re: Building BuzzGUI
Install the NuGet package manager extension for VS. I think it should automatically get the Fody package then.
Re: Building BuzzGUI
No, the project still won't load. It gives these errors...oskari wrote:Install the NuGet package manager extension for VS. I think it should automatically get the Fody package then.
I can see in the NuGet settings that it's supposed to try to install missing packages during the build process but VS won't load the project so I can't try to build it.BuzzGUI\BuzzGUI.MachineView\BuzzGUI.MachineView.csproj : error : Unable to read the project file 'BuzzGUI.MachineView.csproj'.
BuzzGUI.MachineView\BuzzGUI.MachineView.csproj(388,3): The imported project "C:\...BuzzGUI\BuzzGUI.MachineView\Fody.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Re: Building BuzzGUI
Some files were filtered out from the svn repo, they are there now.
Re: Building BuzzGUI
Great! Now it loads but it won't build. It seems to have installed Fody but now I'm getting lots of these three errors...oskari wrote:Some files were filtered out from the svn repo, they are there now.
I'm guessing they all stem from this line which is marked as an error...The type or namespace name 'PropertyChanged' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'DoNotNotify' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'DoNotNotifyAttribute' could not be found (are you missing a using directive or an assembly reference?)
Code: Select all
using PropertyChanged
Re: Building BuzzGUI
Right click the project -> Manage NuGet Packages -> Installed packages should have PropertyChanged.Fody. Is it there?
Re: Building BuzzGUI
No, there are no packages listed. I must have been mistaken about it installing Fody. I also noticed that it's complaining about 'Newtonsoft.Json' being missing too.oskari wrote:Right click the project -> Manage NuGet Packages -> Installed packages should have PropertyChanged.Fody. Is it there?
Re: Building BuzzGUI
Making progress. I managed to install "Fody", "PropertyChanged.Fody" and "Json.NET" into the machine view project via the package manager, which has gotten rid of all the previous errors but it still doesn't build. Now I get just one error which is...
There's no Fody.dll in the path so I need to figure out why it's not there, or perhaps find where it is (if it exists) and modify the <UsingTask> declaration.The "Fody.WeavingTask" task could not be loaded from the assembly C:\...\BuzzGUI\BuzzGUI.MachineView\\Fody.dll. Could not load file or assembly 'file:///C:\...\BuzzGUI\BuzzGUI.MachineView\Fody.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask"
Re: Building BuzzGUI
There's a Fody.dll in "BuzzGUI\packages\Fody.1.25.0" so I guess I can modify the <UsingTask> (wherever that is!) to look in the right place?
Re: Building BuzzGUI
Found this in the "fody.targets" file...
so it looks like $(FodyPath) is wrong. I can probably sort that manually but I'd like to understand why it's wrong.
Code: Select all
<UsingTask
TaskName="Fody.WeavingTask"
AssemblyFile="$(FodyPath)\Fody.dll" />
Re: Building BuzzGUI
I take that back. I can't sort it.IXix wrote:I can probably sort that manually
Tried copying fody.dll into the project path but that just gives a different error so I deleted the copy.
Any idea what I need to do? I haven't got a clue.The "Fody.WeavingTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.
Re: Building BuzzGUI
I don't know what it is either. Can someone else try this? I only have one vs installation and I don't want to fuck it up.
Re: Building BuzzGUI
same here. fixed all the other problems, but stuck on this one. tried to install from nuget, but doesn't help.The "Fody.WeavingTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.
Re: Building BuzzGUI
inelegant workaround:
copy contents of buzzgui\packages\Fody.1.26.0-beta0001 to buzzgui\Fody
edit buzzgui\BuzzGUI.MachineView\Fody.targets changing AssemblyFile="$(FodyPath)\Fody.dll" to AssemblyFile="$(SolutionDir)Fody\Fody.dll"
Edit: oh, right, mine is "Fody.1.26.0-beta0001" because I tried the pre-release and haven't figured out how to roll back to 1.25
Edit2: the crux of the problem is that [Fody.targets]<FodyPath = $(MSBuildThisFileDirectory)> sets the FodyPath to buzzgui\BuzzGUI.MachineView\ instead of buzzgui\packages\Fody-whatever-version\
copy contents of buzzgui\packages\Fody.1.26.0-beta0001 to buzzgui\Fody
edit buzzgui\BuzzGUI.MachineView\Fody.targets changing AssemblyFile="$(FodyPath)\Fody.dll" to AssemblyFile="$(SolutionDir)Fody\Fody.dll"
Edit: oh, right, mine is "Fody.1.26.0-beta0001" because I tried the pre-release and haven't figured out how to roll back to 1.25
Edit2: the crux of the problem is that [Fody.targets]<FodyPath = $(MSBuildThisFileDirectory)> sets the FodyPath to buzzgui\BuzzGUI.MachineView\ instead of buzzgui\packages\Fody-whatever-version\
Last edited by snowglobe on Thu Oct 23, 2014 11:15 pm, edited 1 time in total.
- mantratronic
- Posts: 296
- Joined: Mon Nov 21, 2011 7:23 pm
Re: Building BuzzGUI
thanks!
i needed to restart visual studio to get it to work after editting the file.
edit: and i was using 1.25
i needed to restart visual studio to get it to work after editting the file.
edit: and i was using 1.25
Re: Building BuzzGUI
As per unz, $(SolutionDir)packages\<Fody folder>\Fody.dll also works and eliminates the need to duplicate the folder contents.
Re: Building BuzzGUI
I'm still confused. What do I have to do to get it working?
- mantratronic
- Posts: 296
- Joined: Mon Nov 21, 2011 7:23 pm
Re: Building BuzzGUI
create a new directory in the solution folder called "Fody", move the contents of the current directory buzzgui\packages\Fody.1.YourVersionHere into it, and they edit the project's Fody.targets file from AssemblyFile="$(FodyPath)\Fody.dll" to AssemblyFile="$(SolutionDir)Fody\Fody.dll" , restart VS
Re: Building BuzzGUI
Okay, I think I've nailed this without having to edit or copy anything. It looks like it's some kind of Fody version conflict because if I install an older version (the one that seems to be referenced) then it works okay and the project builds.
If you've already installed Fody and PropertyChanged.Fody then uninstall them both from the NuGet Package Manager.
Now select "Tools/NuGet Package Manager/Package Manager Console" from the VS menu and in the console that opens type the following...
It will ask to overwrite the existing files "Fody.targets" and "FodyWeavers.xml". Answer yes to both and you should see...
Now type...
...watch some status gibberish and then try building the project. Hopefully it will now work.
If you've already installed Fody and PropertyChanged.Fody then uninstall them both from the NuGet Package Manager.
Now select "Tools/NuGet Package Manager/Package Manager Console" from the VS menu and in the console that opens type the following...
Code: Select all
Install-Package Fody 1.13.8 -ProjectName BuzzGUI.MachineView
Code: Select all
Successfully added 'Fody 1.13.8.0' to BuzzGUI.MachineView.
Code: Select all
Install-Package PropertyChanged.Fody -ProjectName BuzzGUI.MachineView