Installed MVVMLight - doing WP7 - VS2010 works fine; Blend 4 doesn't - mvvm-light

I can create an MVVMLight phone app in VS2010. It runs as it should. I can open it in Blend 4. That's all fine.
When I create a new WP7 MVVM project in Blend, several things are wrong:
1. Just compiling, get "A start page has not been specified...." WMAppManifest.xml has incomplete Task section. NavigationPage attrib. with MainPage.xaml is not there.
2. When I manually fix that and build, I get "Project could not be built." It references Microsoft.Phone.Controls.dll and Microsoft.Phone.Control.Navigation (no .dll--and not found, of course).
A non-MVVM Blend phone project correctly references Microsoft.Phone.dll (and Microsoft.Phone.Interop.dll). And it works fine.
Where have I gone wrong in my MVVM installation for Blend 4?
Thanks.

Unfortunately, the newest version of Blend 4 for Windows Phone 7 does not support custom template. What you see now in Blend are the old project templates.
I am aware that the install process at the moment is terrible, and I am working with members of the community to solve that issue (including cleaning up old files).
In the mean time, if you want to clean up old files, there is a list at http://www.galasoft.ch/mvvm/cleaning. Again, sorry that the process is manual at this time.
Cheers,
Laurent

Related

Visual Studio C# ASP .NET Web Form Designer Error

Ok, so I start a new project in Visual Studio (currently updated to update 3) and choose ASP.NET Web Application (.NET Framework).
Then I choose the Empty template and to add the folders and core references for Web Forms.
Ok, great, so I add a webform to the project and then find there's a problem:
Design view or even Split view is not available for the new aspx page.
Pressing the buttons 'Design' or 'Split' do nothing and only the source is seen, which also becomes uneditable.
Now I have seen this issue before and searched and searched for an answer. But the only solution was a complete reinstall - this means a few GB download and then hours of the install program doing whatever it does (it is the slowest install for anything on any platform).
This issue seems to occur randomly, and once it occurs, it seems to be permanent, short of a complete reinstall of VS.
Is this a fault in Visual Studio that will never be fixed?
Does someone actually know how to fix this other than a complete reinstall?
Please do not suggest to try 'Open With' on the aspx file - yes I have tried every option and the original default is the correct one.
Answers from the Microsoft forum are about as helpful as giving wheels to a tomato, such as here. It has even been highlighted for Visual Studio 2008 here. Someone seems to have tried to raise the issue last year here.

Visual Studio Apache Cordova - IOS build rotation issue

I'm a starter in writing app code in Visual Studio 2013 Community Apache Cordova and have managed to connect VS2013 with my Mac. Once I have gone through the process of building the app in VS and on my Mac and installing in on my iPhone, I open it up and it won't rotate. It doesn't rotate for a number of basic apps that I've written nor does it rotate if I build the default new project "Hello, your application is ready!" app.
I have done some research and tried changing the config.xml "Orientation" preference to "both", through the code window and also in the designer window but that doesn't change anything. I've also noticed that adding in a "BackgroundColor" preference doesn't work either.
Does anyone know if I may have configured something incorrectly or perhaps need to add something to my code?
All the HTML, JS and CSS that I've written seems to work okay (with the exception of trying to link URLs to the Safari Browser but that's another issue).
I have noticed the same issues. I tried finding some settings to fix that in the config.xml, but was not successful. I have resolved myself to just opening the iOS project in XCode and changing a few things:
Device Orientation: no matter the config.xml setting, its always only Portrait. I click-check the other 3 orientations.
Team: I have multiple developer profiles, and I need to choose correct one here.
Bundle Identifier. I screwed up one project, and have different case for iOS and Android. I leave the VS one as the Android one, so I can build completely correct for Android. Since I know I have to go to XCode for iOS anyway, I change the bundle identifier here.
You can find the project using Finder at ~/remote-builds/builds/9999/cordovaApp/platforms/ios/*.xcodeproj, where 9999 is the build number, though not necessarily the latest, largest number, but the latest datetime of the folder.
You can also refer to Greg's answer in this related post as an alternative solution.

ParseKit framework in Xcode is red, won't build

I'm trying to add ParseKit to a new command line project in Xcode, but the framework shows as red in the Project Navigator. When I try to build, I get this error
error: /Users/acdlite/Xcode/Chemistry Parser/../parsekit-trunk/build/Debug/ParseKit.framework: No such file or directory
I've followed the directions given by the developer in this answer: How to embed ParseKit as a private framework in a Mac App bundle.
To my knowledge, red indicates that the file is not at the specified location. The file inspector says it should be located at /parsekit-trunk/build/Debug/ParseKit.framework, which actually doesn't exist if I try to navigate there in the Finder. So then where is it located? I have no idea.
I've followed all the steps from scratch like a dozen times now, including checking out the code via SVN. It's driving me crazy, and I feel like an idiot. I wish I could be more specific but I am truly lost as to where to go from here.
Alright, after at least 20 attempts I eventually got it working. Mostly, I followed the steps given by the developer in this answer: How to embed ParseKit as a private framework in a Mac App bundle
However, following the steps exactly didn't work. For the life of me, I couldn't get the ParseKit framework to show up as an option when I attempted to add it as a dependency of my Target. Xcode would just say "No filter results found." So I skipped that step. I also did not add a "Copy Files" build phase. Doing so resulted in a dependency error.
This was way harder than it should have been, and I don't know if that's because I'm stupid or Xcode is poorly designed. Probably a combination of both.
By the way, I'm using Xcode version 4.6.1 (4H512).

Website running .NET 3.5 cannot use feature not part of ISO-2 specs

I am getting this error a lot:
Feature '{insert feature here}' cannot be used because it is not part of the
ISO-2 C# language specification
I am working on a .NET 3.5 website that I've worked on on and off for about two years. I've never seen this error before my most recent around of updates. I'm using a decent amount of LINQ coding throughout and I get these errors related to much of the LINQ code. Based on what I've read it seems like even though I'm using .NET 3.5, for some reason it thinks I'm using 2.0. But I can't find anything that says how to fix it.
One example of a problem is that if I try to add a new item to the App_Code directory, I do not get the option to add a LINQ to SQL dbml file.
If anyone can shed some light on how exactly I would fix this, I would much appreciate it.
I was unable to locate an "Advanced" option under the build tab. I have a feeling it is probably because it is a web app. I looked through the web.config and found 2 parts that may be important. Most things referenced 3.5.0.0 or v3.5. The settings are consistent with older backups of the web.config from when there were no errors. By the way, only intellisense and things within VS2010 are giving me problems. The website is running error free.
I have completed a total uninstall and re-install of VS2010 and I'm still having the same issue. I fired up my old install of VS2008 and I am NOT having this issue there. However, I would MUCH prefer to use VS2010 on this project.
I opened the website in VS2010 on my work computer, and there are no errors reported. This is making me think that there is something on my laptop that is causing the problem. As I noted above, I completely reinstalled Visual Studio 2010 and I am still having the problem. What does this leave? I have only one extension installed in VS, and it's the same one at work and on my laptop. Also, I did not reinstall the extension after reinstalling VS, and the problem persists.
Both PC's run Win7 Ultimate. Have VS2008 and VS2010 installed. VS2010 has the same extension installed on both. On my laptop I have the full version of SQL Server 2008 installed, but only the Management Studio on my desktop (we have a server in the office). Would SS2008 have anything to do with it?
Go to your project properties, the Build tab, Advanced - that should allow you to set which version of C# you want to use. It should default to the latest version supported by the version of Visual Studio you're using, but it sounds like at some point you've switched it to ISO-2.
(That's certainly true for Windows projects and class libraries - there may be a different location in a web app. In particular, have a look in Web.config.)
If this has only started happening recently, I'd have a look through your source control history at changes to any configuration files. Also try creating a new project of the same type, and see if that has the same problem.
Jon Skeet's answer is mostly correct. The location for the update is in the "Property Pages" which I got to by right-clicking on the name of the website, clicking Property Pages, the Build item, then target framework.
The extension I use, Solution Navigator, has it's own heading for the solution. Right-clicking on it DOES NOT give me the Property Pages option. By chance I right clicked on the title of the website under the solution heading and was presented with the Property Pages option. In there was the Build tab which contained the target framework option.
Once I finally found the target framework option, it was indeed set to .NET 2.0 for some reason. I changed it to 3.5, reloaded the solution, and now it works great.
Thanks a million Jon for your help and time working with me!!

EntryPointNotFoundException - Entry point was not found when loading an MVVM Light View in Expression Blend 4

I'm posting this question so I can document the solution as I found it very tricky and time consuming to solve.
I'm using Laurent Bugnion's excellent MVVM Light Toolkit in a Silverlight 4 project and I'm using his ViewModelLocator pattern with the Microsoft.Practices.ServiceLocation.ServiceLocator to load design time models for Blendability. Initially loading the Views up in Expression Blend 4 was working and the design time data binding was great. This stopped working at some point without any error message in Blend at all.
I used Visual Studio 2010 SP1 to attach to Blend.exe to debug the issue. The EntryPointNotFoundException (Entry point was not found) exception was being thrown at this line of code:
return ServiceLocator.Current.GetInstance<ExampleViewModel>();
Strangely enough, I was able to load the same View in the Visual Studio XAML Designer successfully with my design time data binding working correctly. I used another Visual Studio instance to attach the debugger to the Visual Studio instance hosting the XAML Designer and was able to confirm that the ServiceLocator call was executing successfully.
The exception detail (stack trace, InnerExcetion etc) did not give me any further clue to the problem and various Internet searches for the unhelpful error emssage failed to shed any further light.
I eventually got lucky by using the Visual Studio Immediate Window to execute part of the line of code that was causing the problem and got a much better error message:
?ServiceLocator.Current
The type 'Microsoft.Practices.ServiceLocation.ServiceLocator' exists in both 'Microsoft.Practices.ServiceLocation.dll' and 'Microsoft.Practices.ServiceLocation.dll'
Comparing the changeset to previously working code I noticed that I had added a reference to GalaSoft.MvvmLight.Extras.SL4 in a separate Unit Test Framework for Silverlight project (which references the UI project). This test project was referencing the assembly from C:\Program Files (x86)\Laurent Bugnion (GalaSoft)\Mvvm Light Toolkit\Binaries\Silverlight4 where as the UI project was referencing it from ..\packages\MvvmLightLibsPreview.4.0.0\lib\SL4. I had used the nuget package MvvmLightLibsPreview to add MVVM Light to the client project.
The Blend Results - Errors and Output Windows did not show any error message at any point. Obviously there is no real answers required unless there are some Blend trouble shooting techniques which would have helped my figure out the problem faster.
I had almost the same issue though my problem did not go away until I uninstalled MVVM Light using the Windows 7 control panel. The NuGet MVVM Light references were still in the project but now I can see the design time data. It was broken before.
I followed the advice on the MVVM Light web site and attached the Blend preview for Visual Studio 2012 and received the error that you mentioned above (EntryPointNotFoundException). I had no idea even then that I should try to remove two different versions of MVVM Light that were conflicting with each other.
AS you would expect, changing the test project's MVVM Light assembly references to use the same nuget package versions used by the client UI Project fixes the problem. I've no idea why Visual Studio did not have a problem with two versions of the Microsoft.Practices.ServiceLocation.dll being referenced in the same way as Blend.
I ended up trying to copy over the entire contents of the package that would come from NuGet into
C:\Program Files (x86)\Laurent Bugnion (GalaSoft)\Mvvm Light
Toolkit\Binaries
That did not solve the problem.
Since uninstalling MVVM Light took away other things such as snippets, I decided to go back and troubleshoot some more. I was not successful and could only find a rough temporary solution.
I tried comparing projects that would work and projects that would not work by looking at the four DLL files:
GalaSoft.MvvmLight.Extras.WPF4 GalaSoft.MvvmLight.WPF4
Microsoft.Practices.ServiceLocation System.Windows.Interactivity
I don't see any differences in versions.
So, the work around for now is to start a new project using the MVVM Light WPF template in Visual Studio 2012, build it, then remove references to the four DLL's mentioned above. Then I install the package MVVM Light from NuGet and edit out the double entry of the view model locator in App.xaml and then the program works fine. At this point I can see the design data message on the Main window which says
"Welcome to MVVM Light [design]"

Resources