buzz forums

forums of the buzz
It is currently Tue May 22, 2018 8:42 am

All times are UTC




Post new topic Reply to topic  [ 19 posts ] 
Author Message
 Post subject: Building BuzzGUI
PostPosted: Wed Oct 22, 2014 12:50 pm 
User avatar

Joined: Wed Nov 23, 2011 3:24 pm
Posts: 533
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? :?:


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Wed Oct 22, 2014 1:05 pm 
Site Admin

Joined: Mon Nov 21, 2011 2:04 pm
Posts: 273
Install the NuGet package manager extension for VS. I think it should automatically get the Fody package then.


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Wed Oct 22, 2014 1:44 pm 
User avatar

Joined: Wed Nov 23, 2011 3:24 pm
Posts: 533
oskari wrote:
Install the NuGet package manager extension for VS. I think it should automatically get the Fody package then.

No, the project still won't load. It gives these errors...
Quote:
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.

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.


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Wed Oct 22, 2014 1:48 pm 
Site Admin

Joined: Mon Nov 21, 2011 2:04 pm
Posts: 273
Some files were filtered out from the svn repo, they are there now.


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Wed Oct 22, 2014 3:11 pm 
User avatar

Joined: Wed Nov 23, 2011 3:24 pm
Posts: 533
oskari wrote:
Some files were filtered out from the svn repo, they are there now.

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...

Quote:
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?)

I'm guessing they all stem from this line which is marked as an error...
Code:
using PropertyChanged


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Wed Oct 22, 2014 3:36 pm 
Site Admin

Joined: Mon Nov 21, 2011 2:04 pm
Posts: 273
Right click the project -> Manage NuGet Packages -> Installed packages should have PropertyChanged.Fody. Is it there?


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Wed Oct 22, 2014 5:09 pm 
User avatar

Joined: Wed Nov 23, 2011 3:24 pm
Posts: 533
oskari wrote:
Right click the project -> Manage NuGet Packages -> Installed packages should have PropertyChanged.Fody. Is it there?

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.


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Wed Oct 22, 2014 6:08 pm 
User avatar

Joined: Wed Nov 23, 2011 3:24 pm
Posts: 533
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...

Quote:
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"

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.


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Wed Oct 22, 2014 6:13 pm 
User avatar

Joined: Wed Nov 23, 2011 3:24 pm
Posts: 533
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?


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Wed Oct 22, 2014 6:19 pm 
User avatar

Joined: Wed Nov 23, 2011 3:24 pm
Posts: 533
Found this in the "fody.targets" file...
Code:
<UsingTask
      TaskName="Fody.WeavingTask"
      AssemblyFile="$(FodyPath)\Fody.dll" />

so it looks like $(FodyPath) is wrong. I can probably sort that manually but I'd like to understand why it's wrong.


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Wed Oct 22, 2014 7:08 pm 
User avatar

Joined: Wed Nov 23, 2011 3:24 pm
Posts: 533
IXix wrote:
I can probably sort that manually

I take that back. I can't sort it.

Tried copying fody.dll into the project path but that just gives a different error so I deleted the copy.
Quote:
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.

Any idea what I need to do? I haven't got a clue. :(


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Thu Oct 23, 2014 12:33 pm 
Site Admin

Joined: Mon Nov 21, 2011 2:04 pm
Posts: 273
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.


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Thu Oct 23, 2014 6:17 pm 
User avatar

Joined: Mon Nov 21, 2011 9:42 pm
Posts: 688
Quote:
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.


same here. fixed all the other problems, but stuck on this one. tried to install from nuget, but doesn't help.


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Thu Oct 23, 2014 10:19 pm 

Joined: Wed Nov 23, 2011 12:36 pm
Posts: 336
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\


Last edited by snowglobe on Thu Oct 23, 2014 11:15 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Thu Oct 23, 2014 10:27 pm 
User avatar

Joined: Mon Nov 21, 2011 7:23 pm
Posts: 288
thanks!

i needed to restart visual studio to get it to work after editting the file.

edit: and i was using 1.25


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Thu Oct 23, 2014 10:42 pm 

Joined: Wed Nov 23, 2011 12:36 pm
Posts: 336
As per unz, $(SolutionDir)packages\<Fody folder>\Fody.dll also works and eliminates the need to duplicate the folder contents.


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Fri Oct 24, 2014 8:06 pm 
User avatar

Joined: Wed Nov 23, 2011 3:24 pm
Posts: 533
I'm still confused. What do I have to do to get it working? :?:


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Fri Oct 24, 2014 8:32 pm 
User avatar

Joined: Mon Nov 21, 2011 7:23 pm
Posts: 288
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


Top
 Profile  
 
 Post subject: Re: Building BuzzGUI
PostPosted: Sat Oct 25, 2014 7:30 pm 
User avatar

Joined: Wed Nov 23, 2011 3:24 pm
Posts: 533
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...
Code:
Install-Package Fody 1.13.8 -ProjectName BuzzGUI.MachineView

It will ask to overwrite the existing files "Fody.targets" and "FodyWeavers.xml". Answer yes to both and you should see...
Code:
Successfully added 'Fody 1.13.8.0' to BuzzGUI.MachineView.

Now type...
Code:
Install-Package PropertyChanged.Fody -ProjectName BuzzGUI.MachineView

...watch some status gibberish and then try building the project. Hopefully it will now work. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group