Visual Studio 2022 preview is getting me this warning all the time while debugging and the Hot Reload stopped working.
DotnetDebugger.setDebuggerProperty' wasn't found
The complete message :
fail: Microsoft.WebAssembly.Diagnostics.DevToolsProxy[0] sending error response for id: msg-472A7FD7AA508BF6FFA0C62408542776:::1072 -> [Result: IsOk: False, IsErr: True, Value: , Error: { "code": -32601, "message": "'DotnetDebugger.setDebuggerProperty' wasn't found" } ]
All my projects are Blazor WebAssembly
Any idea?
I don't know why this is happening, but it happened to me and decided to repair the installation of visual studio. With that, everything started to work like before.
As I said before, I donĀ“t know why it happens, but that worked for me
The problem disappears after upgrade the blazor webassembly project from net 6 to net 7
I had the same issue with DotNet 6 and i resolve it by setting DebugType to portable in the client project file
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
.
.
.
.
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>$(DefineConstants)TRACE;$(DefineConstants)DEBUG</DefineConstants>
<DebugType>portable</DebugType>
</PropertyGroup>
Related
I get this error when I try to add a Razor Page:
I've tried cleaning the project and even repairing Visual Studio via the installer to no avail.
Opening the indicated log, I can see at the end:
<entry>
<record>3545</record>
<time>2021/01/26 11:36:35.647</time>
<type>Error</type>
<source>Template Bootstrapper</source>
<description>Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Path '', line 1, position 25.
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.EnsureInstallDescriptorsLoaded()
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.WriteInstallDescriptorCache()
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.Save(TemplateCache cacheToSave)
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.Save()
at Microsoft.TemplateEngine.Edge.Settings.ComponentManager.Save()
at Microsoft.TemplateEngine.Edge.Settings.ComponentManager.RegisterMany(IEnumerable`1 typeList)
at Microsoft.TemplateEngine.IDE.Bootstrapper.Register(Assembly assembly)
at Microsoft.VisualStudio.TemplateEngine.Shared.Host.TemplateEngineBootstrapperFactory.TemplateEngineBoostrapper.Register(Assembly assembly)
at Microsoft.VisualStudio.TemplateEngine.TemplateEngineHostManager.InitializeEngine()</description>
</entry>
Try updating Visual Studio to the latest version. That solve our issue when we encountered the same problem
I am trying to install the Visual Studio 2017 extension Multiligual App ToolKit 4.0. everything installed correctly and i managed to get some translation but when ever i go to build my app i get this error
Description:
"illegal Characters in path."
File:
"Microsoft.Multilingual.ResxResources.targets"
Line: 32
this is line 32:
<MultilingualBuild
ContinueOnError="ErrorAndContinue"
AppName="$(MSBuildProjectName)"
ProjectPath="$(MSBuildProjectFullPath)"
SourceCulture="$(DefaultLanguage)"
EmbeddedResource="#(EmbeddedResource);#(Content)"
XliffResource="#(XliffResource)"
None="#(None)"
BuildServerInfo="$(TeamFoundationServerUrl)"
CachePath="$(IntermediateOutputPath)"
HasSharedItems="$(HasSharedItems)"
MSBuildAllProjects="$(MSBuildAllProjects)"
TranslationReport="$(TranslationReport)"
SuppressPseudoWarning="$(SuppressPseudoWarning)"
/>
it is within this node
<Target Name="MultilingualAppToolkit" BeforeTargets="PrepareForBuild" Condition="'$(IsCrossTargetingBuild)' != 'true' AND '$(IsWpfTempProject)' != 'true' ">
has anyone had this problem before or know where/how i can start to debug?
Thanks
i have fixed this by removing the Xamarin.LiveReload Nuget package.
Yesterday I decided to try out VS2019 for Xamarin projects, so I created a Xamarin.Forms project and selected Master-Detail template.
Once it was created, I simply debug it (F5) and I see the test app in the Android emulator. Everything works fine.
Today, I try to run the app again, I have changed absolutely nothing in the code. I rebuild the solution and it builds successfully.
When I run the app, it fails for this reason:
1>Starting deployment to Android_Accelerated_x86_Oreo ...
1>Starting emulator Android_Accelerated_x86_Oreo ...
1>C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -no-boot-anim -avd Android_Accelerated_x86_Oreo -prop monodroid.avdname=Android_Accelerated_x86_Oreo
1>emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-qemu" is in the same location as your system image.
1>emulator: ERROR: ANDROID_SDK_ROOT is undefined
1>Emulator Android_Accelerated_x86_Oreo cannot be started.
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
The only solutions I have found deal with Android Studio, but I'm using Visual Studio 2019.
What can the issue be?
I have this warning that never goes away and I don't know how to get it fixed:
Warning Name cannot begin with the '$' character, hexadecimal value 0x24.
.Android C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1668 Build
After enabling detailed verbosity, it points to this section of the Xamarin.Android.Common.targets file:
<Target Name="_GenerateJavaStubs" DependsOnTargets="_SetLatestTargetFrameworkVersion;_PrepareAssemblies;$(_AfterPrepareAssemblies)" Inputs="$(MSBuildAllProjects);#(_ResolvedAssemblies);$(_AndroidManifestAbs);$(_AndroidBuildPropertiesCache)" Outputs="$(IntermediateOutputPath)android\AndroidManifest.xml;$(_AcwMapFile);$(_AndroidTypeMappingJavaToManaged);$(_AndroidTypeMappingManagedToJava)">
<GenerateJavaStubs ResolvedAssemblies="#(_ResolvedAssemblies)" ResolvedUserAssemblies="#(_ResolvedUserAssemblies)" ManifestTemplate="$(_AndroidManifestAbs)" MergedManifestDocuments="#(ExtractedManifestDocuments)" Debug="$(AndroidIncludeDebugSymbols)"
NeedsInternet="$(AndroidNeedsInternetPermission)" AndroidSdkPlatform="$(_AndroidApiLevel)" AndroidSdkDir="$(_AndroidSdkDirectory)" PackageName="$(_AndroidPackage)" ManifestPlaceholders="$(AndroidManifestPlaceholders)" OutputDirectory="$(IntermediateOutputPath)android"
MergedAndroidManifestOutput="$(IntermediateOutputPath)android\AndroidManifest.xml" UseSharedRuntime="$(AndroidUseSharedRuntime)" EmbedAssemblies="$(EmbedAssembliesIntoApk)" ResourceDirectory="$(MonoAndroidResDirIntermediate)" BundledWearApplicationName="$(BundledWearApplicationPackageName)"
PackageNamingPolicy="$(AndroidPackageNamingPolicy)" ApplicationJavaClass="$(AndroidApplicationJavaClass)" AcwMapFile="$(_AcwMapFile)">
</GenerateJavaStubs>
<ConvertResourcesCases ResourceDirectories="$(MonoAndroidResDirIntermediate)" AcwMapFile="$(_AcwMapFile)" />
</Target>
I have no idea if I need to modify this or if one of my files is causing the issue. I double checked, none of my files actually start with a $.
Any ideas?
Thank you.
Seems to be a Xamarin bug, at least in some circumstances. Logged Github issues here and here with repro steps and a sample project.
Try this:
Open Windows Task Manager -> Go to the Details Tab
End all MSBuild.exe tasks you may find
Go to your project folder, delete Bin & Obj folders (SHIFT+DEL)
Close Visual Studio completely
Open Visual Studio again, open your solution, rebuild.
OR this:
Open Project settings
Go to Android Manifest
Make sure your Version number doesn't have dots or commas
Looking through the diagnostic output of Visual Studio, I could see a lot of '\$' occurrences, most of them related to Google Play.
For me, the solution was that I had forgotten to install Google Play in the SDK Manager (under Extras).
For me, a Visual Studio 2017 update did the trick.
Now it is only a warning anymore.
Name cannot begin with the '$' character, hexadecimal value 0x24.
VS 17 update from 15.4.4 to 15.7.4 was done.
I have experienced this error on Android, and what I have done to make it works is: "Version Number" should be a number and it should not contain the dot.
In MS Visual Studio 2015 Update 3 they fixed several issues thereby our workarounds should be removed (incompatible with Update 3 but work in Update 2). If I just remove them, then developers that do not have Update 3 will see confusing build errors. I want to add into MSBuild script a check that Update 3 is installed. If it is not installed, then show the message that project requires it. I know there it property $(VisualStudioVersion) that tells visual studio version. The question is how to get Update number.
Read the following Registry key using MsBuild:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\DevDiv\vs\Servicing\14.0\devenv\UpdateVersion
When update 3 is installed it should read at least:
14.0.25420
You can easily read registry values from MsBuild using:
<PropertyGroup>
<VisualStudioUpdateVersion Condition="'$(VisualStudioUpdateVersion)' == '' ">
$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vs\Servicing\14.0\devenv#UpdateVersion)
</VisualStudioUpdateVersion>
<VisualStudioUpdateVersion Condition="'$(VisualStudioUpdateVersion)' == '' ">
$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\DevDiv\vs\Servicing\14.0\devenv#UpdateVersion)
</VisualStudioUpdateVersion>
</PropertyGroup>