VS 2010 SP1

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
4/21/2013 1:17:29 PM
Gravatar
Total Posts 3

VS 2010 SP1

Hi, 

First off great product and thank you!!!!!!

The particulars:

What operating system? Windows 7
What database platform? SQL CE
What version of mojoPortal? mojoportal-2-3-9-6-sqlce-net40-deploymentfiles.zip
What version of .NET? 4.0
Steps to produce the problem, expected results, and actual results.

1)Download the zip

2)Extract all files

3)Open website in Visual Studio 2010 with SP1 installed and get initial VS prompt The website ... is configured to run on an older version of the .NET Framework. Do you want to upgrade ...........

If selection is yes, then web.config errors arise. If no, then site loads in IDE.

Try to spin up the site using Cassini or IIS Express 7 and get the following:

Error: Could not load type 'mojoPortal.Web.FeedUI.RssForumFeed'  | File: RSSForumFeed.aspx | Line 1

Warning: AjaxControlToolkit.PasswordStrength.TextStrengthDescriptionStyles is obsolete: The property has been deprecated. Please use the StrengthStyles property instead | File: PasswordReset.aspx | Line 25

I'm able to run the site in WebMatrix with no issues targeting the same install of IIS Express. I'll crack the code and make the necessary changes to get it to work in VS, but just thought I'd post to log it. Most likely an issue with me not reading through the tech docs all that much and trying to get things running, but thought I'd pass it along.

Thanks again.

4/21/2013 1:42:34 PM
Gravatar
Total Posts 18439

Re: VS 2010 SP1

Hi,

See the article Understanding the Difference Between Deployment Files and Source Code.

Note that you are using deployment files that are already compiled for .NET 4. You should choose "no" to any upgrade prompt in VS since upgrading is not really doing anything other than changing config settings for a different version of the framework than the one we packaged it for and apparently breaking it (though I don't know why since I run it under .NET 4.5 all the time with no errors). ie you can re-compile the deployment files all day under .NET 4.5 in VS but since they are already compiled and the package does not contain the source code the existing dlls in the /bin folder are not really being compiled at all and will remain compiled as .NET 4.

If you were running the .NET 3.5 package under .NET 4 then I would expect the errors because there are compatibility problems between .NET 3.5 and .NET 4 web config settings as discussed in the 9th and 10th items in our FAQ.

You should be able to run our .NET 4 deployment files under .NET 4.5 but I would not let VS do any "upgrading", I would just change to a .NET 4.5 app pool in IIS if your machine has application pools designated at .NET 4.5.

Generally I would not work with the deployment files in VS nor do any real mojoPortal custom feature development in WebMatrix since it is optimized for web pages and razor which is not compatible with WebForms used by mojoPortal. 

Hope that helps,

Joe

4/21/2013 2:40:31 PM
Gravatar
Total Posts 3

Re: VS 2010 SP1

Thanks Joe. You rock!

I'm thinking the clue is the desire of the IDE to "upgrade" the app to 4.0 because it detects it isn't 4.0 already. While I'm not certain yet as to why it is seeing that then that most likely means the IIS Express configuration it is trying to use is targeting the 3.5 framework and your dlls are compiled to target 4.0. Just checked the Property Pages and the framework being targeted is 2.0! Pretty sure the 4.0 framework broke backwards compatibility to run earlier versions of the framework in the same app pool. With 3.5 and 2.0 they could run side by side with 4.0 not the case. I think you can do 4.5 and 4.0 side by side though as 4.5 was more of an incremental release?

Changed the target to 4.0 and yes it hoses the web.config. Made a back up first and now am diffing the changes. I excluded the offending file for now, just to see if I can spin it up in VS and sure enough if I target IIS Express it works. If I find anything interesting in the diff I'll let you know. I may be an outlier on this one, don't know if anyone else didn't have the app target the proper framework when opening it for the first time in Visual Studio. 

I'm hoping not to do any tweaks to any of the great stuff you've put together. That's my goal - to find a CMS that doesn't make me need to make changes and thus far I'm stoked by what I've seen and all the hard work you've put into this project/product. WebMatrix for now is becoming more of an IDE geared to Azure services - at least in my opinion. Maybe the only way Guthrie gets to get changes made fast enough versus VS and the internal politics of MS. I'm hoping they come around to supporting more webform concepts(including tableadapters), but won't be holding my breath. In my view, VS2012 isn't worth the upgrade price for the features they are touting. Waiting for the VSWeb IDE to show itself (IDE in the browser).

Thanks again for the super fast reply and the insight. Great work!

Thanks,

Don 

4/22/2013 1:06:18 PM
Gravatar
Total Posts 18439

Re: VS 2010 SP1

Hi Don,

Thanks for the beers! Much appreciated. I'm not 100% sure but I think the mojoPortal source code can be used with the free VS 2012 web edition. I use VS 2012 Pro myself but got it free a while back via the now defunct Microsoft Website Spark Program.

It is true that that different web applications that use the same application pool must all use the same framework version in terms of the hosting environment framework but assemblies compiled for older versions can run along with assemblies compiled for newer framework version in the same web application. For example since we for the moment also still produce packages for .NET 3.5, our business and data layer and other common dlls still are compiled to target .NET 3.5. That is mojoPortal.Business.dll, mojoPortal.Data.dll, mojoPortal.Web.Framework.dll and some others are all compiled for .NET 3.5. The web ui projects we use 2 different .csproj files, one targeting .NET 4 and one targeting .NET 3.5. So the mojoPortal.Web.dll in our .NET 4 packages are compiled for .NET 4 but they still depend on other dlls that target .NET 3.5. Those dlls that were compiled for .NET 3.5 run just fine under .NET 4 or 4.5. Of course the .NET version scheme is a bit confusing because 3.5 is really a superset of 2.0, ie it is 2.0 with some added assemblies with new stuff. .NET 4.5 similarly is .NET 4 with some new stuff added but completely compatible with 4.

Best,

Joe

4/22/2013 10:16:52 PM
Gravatar
Total Posts 3

Re: VS 2010 SP1

Thanks Joe, no problem on the beers - hopefully more to come your way! or at least strongly considering some of the great addons you've produced as well. My background is as an asp.net website developer(10+ yrs) so with the web application approach while I'm familiar with it, it isn't my preferred architecture. You've done a great job and I will dig into the C# projects in the future to see how you work your magic and I'm certain to learn a ton. That said, I think this msdn reference has what I'm looking for in terms of why VS2010 Pro failed to properly target the 4.0 framework on loading the website - for me at least.

http://msdn.microsoft.com/en-us/library/bb398791(v=vs.100).aspx

Setting the Default Target Framework for Converted Web Projects

  • When a Web project that was created by an earlier version of Visual Studio is opened in Visual Studio 2010 for the first time, you can choose not to upgrade the project to ASP.NET 4. If you do that, the target version of the .NET Framework is determined by using the following criteria:
  1. If the project was created or updated by a version of Visual Studio that supports multi-targeting, and if you open the project by using the Visual Studio project file, Visual Studio uses the information that is stored in the project file.
  2. If the previous criterion does not apply and if one of the following is found, Visual Studio targets the .NET Framework 3.5:

                            A compilers section in the Web.config file that maps to a compiler version of "v3.5" for C# or for Visual Basic.
                           References to .NET Framework 3.5 assemblies.

  3. If the previous criteria do not apply and references to .NET Framework 3.0 assemblies are found, Visual Studio targets the .NET Framework 3.0.

  4. If the Web site does not meet any of the previous criteria, Visual Studio targets the .NET Framework version 2.0.

 1. I don't see a project file in the www folder so that's not giving VS any clues as to what to target.

2. The app is targeting 4.0 so I don't see any compilers section and very doubtful you'd still have references to 3.5 assemblies.

3. No 3.0 references for sure as 3.0 was more for WPF than asp.net.

4. Defaults to 2.0 as it gives up :)

For me this isn't a big deal, but just thought I'd pass along the experience I encountered when first trying to open the app. Excluding the file that was generating errors(comments in that file say as much to get rid of it) and changing VS 2010 to target 4.0 for local IIS Express needs to run within the IDE cured everything. I did make a backup of the web.config so after VS rewrote the web.config I put in the original and saved to overwrite. 

Again, I'm seeing a ton of great work and potential use for this app. Need to spend more time just learning everything and see where it takes me.

Thanks again for all the hard work.

Don

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