Problem to load mojoportal.net40.sln solution in recent VS 2013

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/2/2015 2:48:11 PM
Gravatar
Total Posts 18

Re: Problem to load mojoportal.net40.sln solution in recent VS 2013

So THg has it wrong then when it says mojoportal.net40.sln (was added) in rev/changeset 5634, with age 9 months? It's hard for me to believe, sorry. And mojoportal.sln was last changed 12 months before that, it's all in the repo's history.

But more important, which file am I then supposed to use to load mojoportal code in VS2013? mojoportal.sln obviously doesn't work as it's outdated and complains about missing 4.0 target files, offering to either download them - which obviously is the wrong move - or convert to 4.5 which results in an ridiculously amount of errors (killed it half ways at 16104 errors in 860199 files), while mojoportal.net40.sln has somewhat better with only 1020 errors in 288 files.

I mean clearly something is wrong with the set of files your repo offers, or offered, from the default branch current rev. Maybe it will be different with the changes you say you have done now but so far there is nothing new coming down when updating default. I guess I have to wait until the merge to default is done.

3/2/2015 2:58:40 PM
Gravatar
Total Posts 18439

Re: Problem to load mojoportal.net40.sln solution in recent VS 2013

"So THg has it wrong then when it says mojoportal.net40.sln (was added) in rev/changeset 5634, with age 9 months? It's hard for me to believe, sorry. And mojoportal.sln was last changed 12 months before that, it's all in the repo's history."

that is all true, as I told you changing our target to 4.5  did not require changes to mojoportal.sln, the mojoportal.net40.sln was a newer file, it required changes, revision history is correct

target framework is not set by the solution, if you right click a project node (mojoPortal.Web project for example) and choose properties you should see the projects target .net 4.5 framework.

mojoportal.sln is the correct file, it is not out of date for me nor out of date in the repository and I know there are many others using our source code not having any problem

why it is not working for you is a mystery to me

 

3/2/2015 3:05:40 PM
Gravatar
Total Posts 18439

Re: Problem to load mojoportal.net40.sln solution in recent VS 2013

some of the business layer projects do target 4.0 and data layer projects still target 3.5

maybe your machine is complaining about the business layer projects and wants to install  a reference copy of 4.0 for compilation purposes, just let it do that. these class libraries work just fine in 4.5 hosting (because 4.5 is 4.0 runtime as mentioned before), even though they are compiled for 3.5 or 4.0, we could change them to target 4.5 but have not needed to, the web layer is where we got some new things we needed in 4.5

3/2/2015 3:16:17 PM
Gravatar
Total Posts 18

Re: Problem to load mojoportal.net40.sln solution in recent VS 2013

I just did another clean clone of the default branch and rebuild solution works as expected for me

It's really really strange, can I be doing something wrong when I do the clone. As I said, I have never used Mercurial or THg before, using TSVN on a daily basis. I use THg 3.3 and as Source I had:

https://hg.codeplex.com/mojoportal

Destination:

C:\Astrocalc Projects\wchg

All options unticked, as they come by default

Hg command: hg clone --verbose https://hg.codeplex.com/mojoportal C:\Astrocalc Projects\wchg

I did it all again, now getting your updated revision, but still same result as mojoportal.sln hasn't changed.  I simply don't f@1$n get it!

3/2/2015 3:20:06 PM
Gravatar
Total Posts 18439

Re: Problem to load mojoportal.net40.sln solution in recent VS 2013

I think I understand the problem now, as stated in my last post

only the web ui projects actually target 4.5, some projects in the solution still target older frameworks 4.0 and 3.5, VS needs a reference copy of those frameworks to compile those projects. My machine and most others using our code already have these reference frameworks but your machine does not, so it prompts you to install it, you should just go ahead and let it install 4.0 or whatever it wants to install

3/2/2015 4:27:18 PM
Gravatar
Total Posts 18

Re: Problem to load mojoportal.net40.sln solution in recent VS 2013

Well that makes sense, however, I have a problem to conclude exactly which files to download as the VS 2013 page offers 2 options for NET 4.0, original 4.0 which is says is included in VS2013 and 4.0.3 which appears to be on my machine (when looking at installed programs in the CP). Problem is also that when I choose to download the 4.0 files as VS suggest, it doesn't goes ahead and do it but send me to some Czech MS pages that has nothing to with it. I'm not Czech, but lives here because my wife is Czech, so may way to the English download pages are manual so to speak.

Also, after opening another project and looking at available targets to set on the project page 4.0 surely is missing, but do I install 4.0 or 4.0.3 - that's the question - and how can I be sure it wont f*ck up my VS2013 installation? It sure sounds as it would make sense to me to have the full project set to 1 target (i.e 4.5) instead of 3 as now, which sounds like a receipt for trouble somewhere down the road.

At least we seam to have come to an understanding of what the problem is, so some progress at last ;-)

3/3/2015 8:14:20 AM
Gravatar
Total Posts 18439

Re: Problem to load mojoportal.net40.sln solution in recent VS 2013

I think I would go with 4.0

I do not think it will mess up your vs installation

I think when VS 2013 originally shipped it did ship with .NET 4, but apparently now in later versions (update 4) it ships with 4.5 instead

There are very good reasons why some projects in our solution target older frameworks. Until recently we supported 3.5, 4.0, and 4.5 .net and keeping the business and data layers using lower frameworks meant we did not need different versions of those layers, the same version worked with any of the web ui projects, only the web ui projects targeted higher frameworks 4 and 4.5

.NET is largely backward compatible so assemblies compiled against older frameworks can easily be deployed in newer hosting/runtime environments. When we say mojoPortal requires .NET 4.5, we mean it requires .NET 4.5 hosting, it doe snot mean every included assembly is compiled for 4.5. Whether all assemblies target 4.5 for compilation is a separate issue. Since we no longer support 3.5 or 4.0 we could change all our projects to target 4.5 but I have been reluctant to do that because I've wanted to keep it not too difficult for an expert to make their own build for older frameworks and there was no real need to change the target for the business and data layers. If I decide to do that for the next release of mojoPortal it will mean I also have to make corresponding compatibility releases for all of our add on products even though they have no new features, and anyone upgrading mojoPortal will have to upgrade those features at the same time, and the new version of those features won't be compatible with any previous version of mojoPortal, so that will be kind of a hassle and I'm not in a hurry to do it.

I recommend install the needed reference framework for VS.

You could conceivably change the build targets on all the projects in your local copy, but it has to be done in a correct sequence or you will lose project references in the process. Unless you are a super expert I don't recommend that.

3/3/2015 9:25:10 AM
Gravatar
Total Posts 18

Re: Problem to load mojoportal.net40.sln solution in recent VS 2013

Hi Joe and thanks for staying with me... I did indeed now install everything .NET4 MS has on offer, but to no avail, VS2013 still refuses to have any knowledge of .NET4 targeting - except pointing out that some of the included projects need it. Got a bit frustrated there for a moment and left the computer... instead of smashing it ... and then get the idea of not reinstall but run a repair from CP, which is still running and seem to take an eon but I have already seen it pulling down .NET4 Multi-targeting something, so maybe when it's done with its thing I finally can load the project. At least I still have hope!

I can understand your rationale for keeping parts in 3.5 and 4.0, but one thing hot me - can it be the reason why it fails so miserably on Mono already when running Setup? I am pretty sure that the mod-mono-server4 doesn't support 3.5, although as I understand it from what you say are everything running on the web server 4.5?

No, I'm not an expert, at least not on .NET and ASP.NET, maybe on VB6 ;-) which I eventually decided to give up to focus 100% on .NET, I have had VS.NET since version 2005 but due to heavy code investment in VB6 I have never really come to take the step for real, but then one day last year I decided I cannot postpone it any longer and started to convert my more important projects which I plan to expand on.

So while I have been reading books and studied .NET (mostly VB) for several years, I have never come to use it until now, and ASP.NET I just started to look at a few weeks ago and now I probably have to learn C# as well.  Anyway, I will let you know how it goes once the repair is done, it's just about half way so far so maybe another hour...

 

3/3/2015 12:33:18 PM
Gravatar
Total Posts 18

Re: Problem to load mojoportal.net40.sln solution in recent VS 2013

Ok finally success! It loads w/o any complaint about .NET4.0, BUT, in the status bar right corner it says "3041 errors in 580 files" so I then choose to rebuild the solution as per your instructions and it pull down a few things from Nuget, and the errors ticks down to "592 errors in 220 files" and status bar left says "Rebuild All failed"  - what am I missing?

3/3/2015 12:47:26 PM
Gravatar
Total Posts 18439

Re: Problem to load mojoportal.net40.sln solution in recent VS 2013

I suggest try rebuild solution again, does it do the same thing each time?

make sure in the build profile dropdown you have Debug selected, though any of the options shown in the image in this article should work

Maybe try again after a reboot since you just installed a bunch of stuff.

Ignore the warnings in yellow, if after reboot and retry then give an example of the kind of errors

3/3/2015 2:19:01 PM
Gravatar
Total Posts 18

Re: Problem to load mojoportal.net40.sln solution in recent VS 2013

Yes I have Debug selected, and the other DropDown has "Mixed Platforms". After reboot I now have "549 errors in 211 files" instead, in the statusbar. To the left it now says "Ready" but how can I check it was rebuilt?

There is also an "Error List" pane in lower part of window, which seem to be different to the 549 errors. There is just 1 error and 26 warnings. The error there is:

Error    1    The command "C:\Projects\wc\mojoportal\LanguageRemover\bin\Debug\LanguageRemover.exe C:\Projects\wc\mojoportal\Web\App_GlobalResources" exited with code 9009.    LanguageRemover

Among the 549 errors there are things like:

"Cannot find usage of Class 'cleared'" and Cannot find Skin 'cleared'" in this line from BingMapModule.ascx

<portal:EmptyPanel id="divCleared" runat="server" CssClass="cleared" SkinID="cleared"></portal:EmptyPanel>

and in BlogCompare.aspx "Cannot find ContentPlaceHOlder 'phHead' in in the Master page '~/App_MasterPages/DialogMaster.Master'

and an ASP.NET runtime error for that page 'Could not load file or assembly 'AjaxControlToolkit, version 4.5.7.1213, ... or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

Just as some samples as it's a lot to type... but maybe it gives you an idea?

 

 

You must sign in to post in the forums. This thread is closed to new posts.