I had to reinstall my operating system this week and my code which was running before doesn't run anymore in Visual Studio 2015. (The code is unchanged since then)
When I build and deploy the code I have the following error:
Severity Code Description Project File Line Suppression State
Error DEP3321 : To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.10586.0 or higher. You currently are running version 10.0.10240.17443. Please update your OS, or change your deployment target to a device with the appropriate version. HistAppV1
After searching on the Google, this article helped in some sense, so when I unload the project and change the lines from
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
When I change it to
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
I can successfully build and deploy my application, but it crashes at the splash screen with this error.
#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException += (sender, e) =>
{
if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
};
#endif
Where I also get an exception which is
GattServices error CS0103: The name 'GattServices' does not exist in the current context
I haven't found any clear indication about from which version GattServices are included, but I assume that the change of versioning causes the trouble. How do I solve this problem? Or how can I keep my version, or update my VS to have the appropriate version?
I'm using Visual Studio 2015 Community Edition as in my previous computer install. As I mentioned the OS is a fresh reinstall, with fresh installs of Visual Studio, so I don't really now what is going wrong now.
UPDATE: The latest version is installed and I did a full reinstall of VS2015 with all the packages and still the same error.
Also, I checked the installed programmes, and everything seems to be there:
You have installed the first release of Windows 10 (version 1507, see the version history). Your code requires version 1511 (November 2015 update). I don't think it makes sense to modify your application to support such an old version. Windows 10 has practically forced updates to later versions so I would not expect any significant number of version 1507 installations in the world. Just install the OS updates on your PC and everything should be working fine again.
Related
I have a C# Console application that was developed in different machines. In this application, we chose to use Fody, because it's the only thing we found that would embed all external resource dependencies (any extra class libraries) into a single executable for our application.
Environment Detsils:
Visual Studio Version: 16.9.2 (Professional 2019)
Type: Console application
Framework: .Net Framework 4.5
Fody Version: 4.2.1
Costura.Fody Version: 3.3.3
While this application worked without any issue in one machine, it starts giving trouble to another machine. We need to get this work on both machines as we need to cover lots of work. We have compared the two environments but couldn't figure out any difference.
the behavior of the issue is as below,
The first time when I clone and build a solution it goes in a
never-ending path and I have no other option other than end tasking
the visual studio.
And I observe that MSBUILD is occupied by something and I cannot end
task it
The second time when I start the solution and build it, I am getting
the following error.
Severity Code Description Project File Line Suppression State
Error CS2012 Cannot open '<<obj folder path>>\Debug\Binary.exe' for writing -- 'The
process cannot access the file '<<obj folder path>>\Debug\Binary.exe' because it is being
used by another process.' Binary.exe <<project path>>\CSC 1 Active
I had to restart the machine to remove the obj folder. And once it is removed Same above behavior repeats.
I found below a similar question below thread,
Error during building application with PropertyChanged.Fody
But it seems like this feature is obsolete in the latest Visual studio as per the below question.
Disabling Visual Studio hosting process on Visual Studio Community 2017
Further, I have tried to set the environment variable as explained in the below thread as I thought its somewhat relevant. However, it doesn't work as well.
https://github.com/Fody/Fody/issues/537
I must use these Nuget packages in my solution. Highly appreciate it if someone can share some thoughts to sort out this issue
Has anyone faced this ... Was working fine a week ago.
Steps I tried:
Re-installed the installer
Re-installed Visual Studio 2019 Enterprise
Ran several repairs from the installer
Clean install.NET 3.1 Framework / .NET 5.0 Framework / VS Framework (basically all the frameworks)
Delete obj & bin folders and build
Deleted and installed all packages (installer was failing due to Debuger/Remote package being corrupted)
It fails the build every time there I'm trying to get a list by direct index as in the picture below e.g. wagons[i]
This is where it says it fails:
So after all a simple check for a windows update, updating and installing with a restart fixed it. As far as I could judge the C# compiler csc.exe file was misbehaving.
Could be worth a try if anyone else experiences a similar glitch
I am getting the error: "Could not find SDK "Microsoft.VCLibs, Version=14.0" whenever I attempt to build the default "Blank App (Universal Windows)" app.
I know I have compiled UWP apps before, and is potentially a consequence of recently trying the VS2019 preview (now removed)
I've tried uninstalling/reinstalling VS2019, VS2017, even installed 2015 and the blank UWP apps in each all come up with the same error.
I've tried uninstalling/reinstalling/repairing Windows 10 SDK's.
I've tried various versions of the Microsoft.NETCore.UniversalWindowsPlatform to no avail. (The default is v6.2.10).
Can anyone explain how I can logically chase this error? I'm assuming that it is failing to build the UniversalWindowsPlatform nuget - is this correct? What is supposed to be installing the vclibs extension? How can I see what is preventing it from being installed?
No amount of repairing/installing VS2019, VS2017 or even VS2015, adding or removing options, (re)installing SDKs, (re)installing Visual C++ Runtime libraries made any difference.
what did eventually work was installing VS2019 on a new PC and then copying its entire "C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs directory across.
If installing VS2019 installs this directory, I'm not sure why it doesn't fix it as part of reinstalling and/or repairing it!! An opportunity for improvement in VS2019 repair perhaps?
Big thankyou to #NicoZhu-MSFT for all of your help!!
I installed Visual Studio for Mac and around to build the application for Android it gave me this error. I installed NDK and now this error appears to me.
Do you know how to solve this?
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2873,3): error XA5101: C compiler for target Arm was not found. Tried paths: "/Users/UserName/Library/Developer/Xamarin/android-sdk-macosx/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc; /Users/UserName/Library/Developer/Xamarin/android-sdk-macosx/ndk-bundle/prebuilt/darwin-x86_64/bin/gcc" [/Users/UserName/Projetos/ProjectName/app/src/android/ProjectNameApp.Droid/ProjectName.Droid.csproj]
An error occurred when executing task 'Release-Android'.
Teardown
Executing custom teardown action...
Environment: QA
Configuration: Release
Target: Release-Android
Error: One or more errors occurred. (MSBuild: Process returned an error (exit code 1).)
MSBuild: Process returned an error (exit code 1).
I have already seen several solutions but I can not solve it, I have already installed NDK, I have already validated the folder where it is installed, I have already inserted AndroidNdkDirectory in Droid.csproj and so far none of this has resulted.
There are two potential ways to resolve this issue:
You can switch the Android NDK version to r17 or lower. One way to do that is to un-check NDK from the Android SDK manager (the Tools tab from your screenshot) to uninstall version r19, then select the gear icon from the lower right of the window, pick the Microsoft (Recommended) repository, and check NDK version r17 (which should now appear in the list) to install that version.
Or, if you are working on code where you can use a preview version of Xamarin.Android, you can update to the current preview Xamarin.Android version 9.3.0.19 by switching to the Preview updater channel in Visual Studio for Mac.
Additional info
The current Xamarin.Android SDK version 9.2.3.0 is not yet compatible with Android NDK versions r18 or higher, where GCC has been removed.
Compatibility with those newer NDK versions (and in particular, compatibility with the change from gcc to clang) is included in the preview Xamarin.Android SDK version 9.3.
I've seen a lot of thread(s) regarding with their visual studio 2012 app to run with their Win XP-32bit. Some says you need to change your target framework to 4.0 below, install the same framework to target pc, then make sure you include your publish-prerequisite to your target framework.. but it doesn't work on my case ,it always says that my app is not a valid win32 etc.
my last resort would be compiling my vs 2012 app to vs 2010 but i dont think it's a good idea though.
temporary solution:
for future reference(if the update solution dont work for your case):
build your window app(c#) to framework 4.0,
copy the files on your Debug Folder and paste on target pc
Run the .exe
Voila!