Silverlight 4: Resolving Microsoft.Silverlight.CSharp.targets was not found? - visual-studio-2010

I've been upgrading some Silverlight 3 apps to Silverlight 4 in Visual Studio 2010. My Silverlight 3 apps open fine in Visual Studio, but SL4 apps don't, with the following error:
C:\Path\To\MyProject.csproj : error : Unable to read the project file 'XNTVOD.AdminClient.csproj'.
C:\Path\To\MyProject.csproj(593,3): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
I had a problem with older VS Silverlight components and recently uninstalled most of the SL components, and right now in Add/Remove programs I have:
Microsoft Silverlight
Microsoft Silverlight 3 SDK
Microsoft Silverlight 4 Toolkit April 2010
The <import> declaration looks like this for the SL4 project:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
That folder, C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0 only has two files in it:
Microsoft.Ria.Client.targets
Microsoft.Ria.Client.VisualStudio.targets
What Silverlight development component am I missing in particular? I see a bunch of different options, from Silverlight 4 SDK Beta to VS Tools for Silverlight 4 and a bunch of others. I don't want to install stuff that will get me right back to the situation I had before this one with outdated components.

Looks like this is the missing piece...
Silverlight 4 Tools for Visual Studio 2010

The file that's missing ships in the Silverlight 4 SDK. You can either install just the Silverlight 4 SDK, or re-install the entire Silverlight 4 Tools for VS2010 package (which will re-install the developer runtime, SDK, a hotfix for VS2010, the Silverlight 4 Tools package, and WCF RIA Services).

You may get this with Silverlight version 4 projects when trying to open in version 5 if version 4 bits are not on that machine. What has worked for me (after several hours of trying everything) is to edit the csproj file and change the silverlight target version
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
From 4 to 5

This worked well for me...also had to install Silverlight 4 Developer runtime

Afer many tries, what worked for me was:
1. go to add or remove programms
2. remove all silverlight versions installed (4, 5 or even if version is not specified remove it too!)
3. install Silverlight 4 SDK
4. install Silverlight 5 for developers
Finally opened the project in VS 2010 SP1

A previously working installation can break when you install a new version of TFS on the server (or whatever it was that messed with my MSBuild).
My 'targets' files had disappeared from C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v5.0 on Server 2012 and reinstalling the tools.
I believe it may be possible to just copy the targets files from another machine but not 100% sure.

Related

.Net 6 Not show in Visual studio TFM,

It's weird.
If I create a new project and choose DotNet 6 framework by Visual Studio 2022. I will get the NETSDK1045 error code.
But create a new project from the console, everything is Ok.
Run dotnet --list-sdks and see if the expected .NET6 version is installed.
My guess is that you might have x86 issue. If you have installed x64 version, install x86 version and vice versa and test if the issue is gone.
You can also try to repair your VS 2022 instance and/or upgrade to latest official version.
There is also a small probability that you select a project type that does not supports .NET 6 (for example .NET Framework Web App project type).
Also you may check your path contains the dotnet folders in the correct order for your architecture.
References:
https://learn.microsoft.com/en-us/dotnet/core/tools/sdk-errors/netsdk1045
VS2017 : Target framework drop down does not show .NET Core 2.1 option

Is it possible to create a Windows 8 Store App from Visual Studio 2013?

So, I have a Windows 8.1 machine with Visual Studio 2013 installed. Whenever I go to create a new Windows Store project I do not see any options to create a new Windows 8 Store app, rather than Windows 8.1 Store App. However, I have no problem opening existing Windows 8 Store App Projects.
Is it possible to create a Windows 8 Store App project from Visual Studio 2013 when running on Windows 8.1?
It's easy - create a new 8.1 project and remove the following lines from the .csproj file:
<TargetPlatformVersion>8.1</TargetPlatformVersion>
<MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
Reopen the file and voila - it's a Windows 8 project!
Additionally, you might want to change the following as well:
In MainPage.xaml:
- <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
+ <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
In Package.appxmanifest:
- <m2:VisualElements
+ <VisualElements
- Square150x150Logo="Assets\Logo.png"
- Square30x30Logo="Assets\SmallLogo.png"
+ Logo="Assets\Logo.png"
+ SmallLogo="Assets\SmallLogo.png"
- <m2:SplashScreen Image="Assets\SplashScreen.png" />
+ <SplashScreen Image="Assets\SplashScreen.png" />
- </m2:VisualElements>
+ </VisualElements>
If this doesn't work - it might mean that the project files have further changed in current versions of VS and you might need to install VS 2012 (Express should do) and create a project in that. You can then work on it in the new version of VS.
Is it possible to create a Windows 8 Store App project from Visual Studio 2013 when running on Windows 8.1?
No. You need to use Visual Studio 2012 to create the Windows 8 project, then open it in VS 2013. This can be done in Windows 8.1, but requires installing VS 2012 side by side with VS 2013.
I did the following:
It's easy - create a new 8.1 project and remove the following lines from the .csproj file:
<TargetPlatformVersion>8.1</TargetPlatformVersion>
<MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
Reopen the file and voila - it's a Windows 8 project!
But it's not Voila. Reloading the project after this edit puts up a dialog saying VS2013 needs an update, and directs you to the MS Download site (assumedly to download the Phone 8.0 SDK.
I made completely sure I had the Phone 8.0 SDK installed with VS2013 installer. I even went so far as to remove (with 2013 installer) and re-add. Still this behavior persists. I'm now downloading the 8.0 SDK, which is installing 2012 Express of course. We'll see if that helps, but it seems like this shouldn't be necessary. What am I missing?
It didn't resolve the behavior. Now, I load up the solution and it won't load the project. The project has the notation (update required). When you select download update from the context menu, it just takes you to MS Downloads--no idea what needs to be downloaded.
Can someone please explain the highly voted answer above? I'm running Win 8.1 Pro with VS2013 Premium (Phone 8 SDK installed)...and I now have the VS2012 Express install that came with the regular Phone 8.0 SDK download. Thanks.
As Reed said, you cannot create Windows 8 App store project in Visual Studio 2013 and you need to have VS2012 installed too. But as a trick you can make a copy from an existing Win 8 app project and modify it. It is not very neat solution but works if you do not want to install VS2012 as well.
You need to use Visual Studio 2012 to create the Windows 8 projects.
Based on my own experience if you don't have do developer a Windows 8 version, just focus on 8.1. For me only 3% of the sales are generated by the Windows 8 version. I only backported my 8.1 app for experience sake.
You cannot developer Windows 8.0 application using VS 2013. You have to install VS 2012 for Windows 8.0.

Error on Installation of MVC3 at Windows 7 -32 Bit Operating System

I want to run MVC 3 on my Windows 7 32 Bit machine. I have Visual Studio 2010 and I can create ASP.NET MVC2 projects there. But now, I want to install MVC 3 in my machine. So,
I tried the online installation using Web Platform Installer from http://www.asp.net/mvc/mvc3 link. After installation, I didn't find the ASP.NET MVC 3 Web Project Template in my Visual Studio 2010 Project Templates.
So I again downloaded the Offline Installer from same link. But I got error when I ran the installer. Clicking on the Log file I got:
OS Version = 6.1.7600, Platform 2
OS Description = Windows 7 - x86 Ultimate Edition
CommandLine = h:\temp\ext6142\setup.exe
Using Simultaneous Download and Install mechanism
Operation: Installing
Package Name = Microsoft ASP.NET MVC 3
Package Version = 3.0.11209.0
User Experience Data Collection Policy: Disabled
Number of applicable items: 6
Exe (h:\temp\ext6142\VS10-KB2465236-x86.exe) succeeded.
MSI (h:\temp\ext6142\AspNetWebPages.msi) Installation failed. Msi Log: Microsoft ASP.NET MVC 3_20110118_142652087-MSI_AspNetWebPages.msi.txt
Final Result: Installation failed with error code: (0x80070643), "Fatal error during installation. " (Elapsed time: 0 00:01:39).
After installing from web platform, I didn't check the selected .NET Framework Version in Visual Studio Project Template when I wanted to create a new project in MVC 3. Default .NET Framework was 3.5 in the visual studio of my machine. So MVC 3 project template wasn't showing in the project templates.
And, without uninstalling the existing MVC 3, when I again wanted to install MVC 3 from offline installer, I got the error I mentioned in my question. It may happened because either performing same installation or the file was corrupted at the time of downloading or any other issue.
Later, after uninstalling MVC 3 from control panel, I again run the web platform installer to install the MVC 3 and this time I check the selected .NET version. I selected .NET Framework 4 and MVC 3 project template is now appeared in visual studio's project templates.
My computer had trouble uninstalling an older MVC3 RC. Fix:
Remove the trailing backslash from the following registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0\Path
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ASP.NET\4.0.30319.0\Path
Uninstalled the old version of "Microsoft ASP.NET Web Pages".
Add the trailing backslash back to those keys.
Install MVC 3.
Full uninstall instructions:
http://drew-prog.blogspot.com/2010/11/how-to-uninstall-microsoft-aspnet-mvc-3.html
In any case it's good idea to download the offline installer. The web one doesn't care about error messages, and just shows success.
In my case it was c# async CTP that was blocking the installation - the offline installer at least told me so:)

How to build Silverlight 4 applications without Visual Studio?

We're setting up a TeamCity build server for continuous integration. To keep things clean, we don't want to install Visual Studio on the build server. I'm wondering how we can build Silverlight 4 apps without it?
I'd expect there to be a Silverlight 4 SDK which installs separately from VS - but so far I haven't found one. There's the Silverlight 4 tools for VS 2010, but that refuses to install without VS. I also found a link to a Silverlight 4 SDK RC, but I assume there should be an RTM version by now :).
If we have to, we can manually copy a few files from a VS machine to the build server. But we don't want to do a full VS install, since it will make the CI environment too different from production.
Visit the Silverlight Tools topic on MSDN, scroll down to toward the bottom you will find a section on the Silverlight 4 SDK which includes a link to an independent install for the SDK alone. This install should not require VS and is what you need for a CI machine.

dotnet Framework 4 missing from visual studio 2010

I just installed visual studio 2010 but when i create a new project Framework 4 does not appear in the options for target framework. I know framework 4 installed correctly because the new app pools set to v4 were created in IIS. For some reason it's just not showing up in visual studio. I tried repairing dotnet 4 and reinstalling visual studio but still no luck. Anyone else have this problem or know how to fix it?
First of all you shoul use the .NET Framework Setup Verification Tool to check the .NET 4 have been properly installed.
I also recommend you to check the both products language, sometimes it could be the problem.
If everything is ok, i guess you have registry problem, so you would have to check the installation keys or use .NET uninstall tools.
More info:
Detection keys for .NET Framework 4.0 and Visual Studio 2010
Uninstall .NET Framework Tool
Visual Studio does not detect .NET Framework 4
Hope helps!
I had the same problem and it turned out to be that I needed the Microsoft .NET Framework 4 Multi-Targeting Pack. No other combination of actions would fix this.
I tried all the ways but no success,
According to this link,you can solve this problem by copy frameworklist.xml file from another computer and paste it in your system.
I had the same problem and I resolved it. I found out that there were no file FrameworkList.xml in folder C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\RedistList.
But I noticed this file in machine where .Net Framework 4 is accessible from VS
2010. Then I copied this file to my computer and restarted VS 2010. And .Net Framework 4
appeared from drop down list.
I attached frameworklist.xml file from my system :Download frameworklist.xml
Changes which lead to missing .Net4 problem:
1.
I changed some registry settings in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
CommonFilesDir
CommonFilesDir (x86)
CommonW6432Dir
ProgramFilesDir
ProgramFilesDir (x86)
ProgramW6432Dir
All those were moved from C: drive to another drive (E: in my case)
2.
I changed the location of some user folders:
C:\Users\<name>\AppData\LocalLow
C:\Users\<name>\AppData\Roaming
Those were moved (via Properties->Path->"Move" button) from C: drive to F: drive.
After reverting 1. back to drive C:
and creating symbolic links in C:\Users\<name>\AppData to the new locations,
it worked again (note: I uninstalled VS before reverting the changes, and installed again afterwards)
(Create link with: mklink /d C:\Users\<name>\AppData\LocalLow E:\Data\LocalLow)
I can not say if both changes are really needed, because I changed both at once.
But finally it works again ;)
Greetings,
Frostregen
I'm seeing the same problem. We were using my build box to test installs of a WinForms app on a machine without 4.0. We bundled 4.0 in the manifest and the app works, Framework 4 Client Profile and Framework 4 Extended show up in add/remove programs, but there is still no 4.0 Framework in the VS2010 options.
BTW, reloading SP1 was no help.
I finally got this working by running the VS2010 setup in repair mode. I now see Framework 4.0 options in VS2010.
That was a long and tedious process and now I have to patch to SP1 again. MSFT should fix this behavior in a SP soon.
Had the same problem. Numerous uninstalls and reinstalls of visual studio 2010 and the .NET 4.X frameworks didn't fix it.
Manually uninstalling the "Microsoft Visual Studio Macro Tools" item and then doing a repair install of VS2010 seems to have done the trick.
I had the same problem this week and it got resolved by installing Visual Studio 2012 RC.
Removing and reinstalling .NET Framework 4 didn't help and I couldn't reinstall Visual Studio 2010. After installing the 2012 RC the Framework 4
I had installed .NET 4.5, which ended up breaking something, so decided to uninstall. VS 2010 could not longer see .NET 4.0. I tried using the .NET cleanup tool and reinstalling, but no go.
Eventually what worked was what is posted at http://social.msdn.microsoft.com/Forums/eu/netfxsetup/thread/3dede142-82ce-430c-bbe6-d824f0fb94a4. I installed Windows Phone Developer Tools (http://www.microsoft.com/en-us/download/details.aspx?id=13890) up until the multi-targeting package, at which point I canceled installation.
You can reinstall the targeting pack using this command, this solved my issue:
Microsoft .NET Framework 4 Multi-Targeting PAck
WCU\MTPack
COMMAND--> NetFx_DTP.msi EXTUI=1 /log "%TEMP%\dd_netfx_dtp.txt"
I think it's because you installed higher version of .net framework, such as .net framework 4.6, Which caused the mistake of missing .net framework 4.0.
For me using Arash's fix worked "there were no file FrameworkList.xml in folder C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\RedistList".
I noticed I had other .NET versions and just copied the FrameworkList.xml from one of those to 4.0 RedistList folder and it worked.
Problem:
VS2010 ->Right Click on Project -> Property Pages - > Build->Target Framework
is showing up to .NET 3.5 only. I have installed up to .NET 4.5 framework.
Solution:
I tried many solutions and decided to take a drastic step to format. The following way I got the solution without formating o/s.
Removed all .NET installations
Installed one by one from 1.0 to 4.6 with sps available.
VS2010 setup with repair option selected.
Opened vs2010 project and .NET framework up to 4.0.3 found in the list.
Regards, S.SREENIVAS RAO

Resources