Environment.SpecialFolder.Personal shows the OneDrive folder eroneously - c#

Win 11. C# Visual Studio 22 Version 17.5.0 Preview 5.0
I have uninstalled OneDrive. File Explorer show "Documents" as C:\Users\Mike\Documents but Environment.SpecialFolder.Personal (or .MyDocuments) returns C:\Users\Mike\OneDrive\Documents.
How can I resolve this?
Mike.
I tried to set a string to the "Documents" folder but got the "OneDrive\Documents" folder.

Related

The imported project C:\...\v4.5\Microsoft.Expression.Blend.WPF.targets" was not found

I was developing my WPF projects using Visual Studio 2013 in my old window 7. But when I installed new Windows 10 and also Visual Studio 2017 and tried to open my project; my project fail to load and got this error message:
the imported project "C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\MSBuild\Microsoft\Expression\Blend.NETFramework\v4.5\Microsoft.Expression.Blend.WPF.targets"
was not found. Also, tried to fiend
"Microsoft\Expression\Blend.NetFramework\v.4.5\Microsoft.Expression.Blend.WPF.targets
in the fallback searchpath(s) for $(MSBuildExtensionsPath) -
"C:\Progam Files (x86)\MSBuild" . These search paths are defined in
"C:\Users\AdminPC\AppData\Local\Microsoft\VisualStudio\15.0_51bebed7\devenv.exe.config"
. Confirm that the path in the declaration is correct , and
that the file exists on the disk in one of the search paths.
C:\Users\AdminPC\Documents\Visual Studio
2013\Projects\MyCustomMessages\MyCustomMessages.csproj
I Searched for some solutions I found I have to install BlendWPFSDKv4_en.msi Version 4, but still doesn't help also there is no BlendWPFSDKv4_en.msi version 4.5. What Should I do, Shall I install VS 2013 in order to fix this issue?
The imported project C:\…\v4.5\Microsoft.Expression.Blend.WPF.targets" was not found
Found it. You should launch the Visual Studio Installer from the start menu, switch to the "Individual components" page, under the "SDKs, libraries, and frameworks" heading, find the "Blend for Visual Studio SDK for .NET" and install it:
After the installation is complete, you will find it under the path:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Expression\Blend.NETFramework\v4.5
Certified:Visual Studio 2017 - What happened to Expression interactions?
Hope this helps.
You can remove the reference to blend;
With VS 2019 - Right click on the (unloaded/load failed) project.
Select - edit your *****.csproj file.
At the bottom of the file, remove the following line
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Expression\Blend\.NETFramework\v4.5\Microsoft.Expression.Blend.WPF.targets" />
Save, Reload the project & happiness.
I had solved the problem by installing
Install Microsoft Expression Blend Software Development Kit (SDK) for .NET 4,
without install an older version of VS
I had solved the problem by installing VS2015 in the same machine that has VS2017 and now the project works fine in VS2017.

visual studio does not recognize windows 10 sdk in version 10.0.14393.0

my Visual Studio does not recognize my Windows 10 SDK.
The steps to reproduce it:
Install VS 2015 Professional with update 3 and select the windows SDK for version 10.0.14393.0 as optional feature
Create an UWP App with this version
The following error is displayed in the output window:
error : The project requires a platform SDK (UAP, Version=10.0.14393.0) that is not installed. Please visit the following link for more information: http://go.microsoft.com/fwlink/?prd=12514&pver=14.0&sbp=PlatformSDKMissing&plcid=0x409&o1=UAP,%20Version=10.0.14393.0
Uninstall Windows 10 SDK 10.0.14393.0
Install Windows 10 SDK 10.0.14393.0 from the link provided in step 3
Create an UWP App with the version 10.0.14393.0 and the same error like in step 3 is displayed
further information: in the list of programs and features in the control panel the name of the sdk is:
Windows Software Development Kit - Windows 10.0.14393.795
and the version is
10.1.14393.795
My guess is that the version is wrong in the registry and therefore visual studio cannot find the sdk.
If I look under the path C:\Program Files (x86)\Windows Kits\10\Platforms\UAP I can see a directory named 10.0.14393.0 that contains a Platform.xml and a PreviousPlatforms.xml as it should.
Under the path C:\Program Files (x86)\Windows Kits\10\bin there is a directory named 10.0.14393.0 too so the SDK seems to be installed correctly
I already tried reinstalling of visual studio and several SKDs in different versions from VS or the online link and nothing worked. If I target another SDK Version like 10.0.10586 I am able to create the project.
Thank you for reading. I am thankful for every hint into the right direction.
Reinstalling Windows is not necessary. Modify the existing installation of VS2017 and remove the check next to Universal Windows Platform development, then go to the Individual components tab and select the Windows SDK 10.0.14393.
Click Modify.
Once finished, Modify the existing installation of VS2017 again and recheck the Universal Windows Platform development box and Click Modify.
Problem resolved and no restart required.
I had this same issue but resolved it by installing the .033 version rather than the latest .795. It is available on the SDK download page in the description of the SDK by clicking on the link behind 'QFE':
Windows 10 SDK (ver. 10.0.14393.795 – a QFE for 10.01.14393.033) and Microsoft Emulator for Windows 10 mobile
Also, even though it wasn't required, I uninstalled .795, then rebooted. Then installed .033 and then rebooted again prior to trying to open visual studio.
I'v already installed Windows SDK 10.0.14393.795 successfully. Then I create UWP project which targets 14393 successfully. So I could not reproduce your issue.
I already tried reinstalling of visual studio and several SKDs in different versions from VS or the online link and nothing worked.
If you have tried to repair your visual studio, but it still didn't work. You'd better use  http://aka.ms/vscollect to gather the installation logs. Find vslogs.zip from %temp% folder. Please upload the file and share the link here. I will help you find the root cause according to the log file.
The solution is to reinstall windows and make a clean install of Visual Studio. Somehow the system got messed up and not even a visual studio reinstall could help.

Xamarin visual studio not opening .axml file in android project

When I try to open the layout.axml in visual studio (Xamarin). Please see the screen shot of when I try to update the Android SDK.
I am using visual studio not xamarin studio windows 10 anniversary addition.
Close all programs that use this file.
And be more attentive. Alert window told you reason and solution.
P.S.(offtop) I see that you installed your android sdk in program files, don't do that, use simple paths as "c:\android", because some packets wouldn't work properly if path contains spaces.
Try this :
close your visual studio.
go to your android sdk folder. for example ; C:\Program Files (x86)\Android\android-sdk\
open temp folder. you will see something like this : tools_r25.2.5-windows.zip / tools_r25.2.2-windows.zip.
Extract the latest version to your android sdk folder e.g; C:\Program Files (x86)\Android\android-sdk. It will replace all the files inside tools folder.
open your visual studio and try load back the axml.

Where is the Visual Studio Macro for FrameworkSDKDir?

There used to be a Macro for FrameworkSDKDir for .net apps in the Build Events tab. As mentioned on MSDN, that's:
The directory into which you installed the .NET Framework.
Now on Visual Studio 2015 on Windows 10, it's not in the Macros list. I verified, and I do have the Windows 10 SDK installed. The path should be C:\Program Files (x86)\Windows Kits\10\ . I know I can just hard code that value, but there's a reason for Macros…
So, is there some way to get it back?

Is the XAP file from Visual Studio 2010 a valid App?

The .xap that has been generated in Visual Studio 2010(Windows SDK 7.8) seems to have the one mentioned in the wiki (http://msdn.microsoft.com/en-us/library/windows/apps/br211475.aspx) which is for Visual Studio 2012.
If I submit the app will Microsoft process the xap or not ?
If you build that xap file using the Release build and if you correctly fill all info, your app can be submitted to the store.

Categories