How to resolve VS 2022 Maui invalid file path error? - visual-studio-2022

I have a Visual Studio 2022 (17.4.3) solution.
I'm migrating a Xamarin app to Maui.
I get two build errors:
APT2144 invalid file path 'C:\...\obj\Debug\net6.0-android\res\resources\styles\styles.xaml'
APT2144 invalid file path 'C:\...\obj\Debug\net6.0-android\res\resources\styles\colors.xaml'
The files exist as app assembly/Resources/Styles/Colors.xaml and Styles.xaml.

I made two changes that resolved the issue:
changed file names to lower case to match Android naming conventions (I also needed to fix the reference in App.xaml)
I changed styles.xaml/Properties/Build Action from "Android Resource" to "MauiXaml"

Related

SideBySide issue with ArcGISRuntime SDK version100.11

Trying to update my WPF application from the ArcGIS Runtime SDK version 100.6 to 100.11. I used the existing style in the WiX package to update the dll's so that all I had to do was ensure all the shader .cso files were accurate in the Components. Here is the screen shot of my dll's that are configured:
When I try to run the application, I get an error that it cannot access the RuntimeCoreNet100_11.dll. In the Event Viewer I get the following message:
In running the SxsTrace program, for the runtimecoreAssembly, it states the Parser "Did not find manifest for culture Neutral".
Any help here would be very appreciated.
Update
per the instructions given in the comment, i added the manifest file to the dependency components in the component group pictured above. this allowed my app to start, but immediately crashed with a KERNELBASE.dll error. Anyone familiar with fixing those?
Looks like you're missing the manifest files. There should be 4 files to deploy to each clientXX folder: runtimecore.dll, runtimecoreAssembly.manifest, RuntimeCoreNet100_11.dll and RuntimeCoreNet100_11.WPF.dll

ASP.NET Core error on building with NSwag Error MSB3073

When I build the application, I get the following error message
The command "dotnet "C:\Users\Adminuser\.nuget\packages\nswag.msbuild\13.0.6\build\../tools/NetCore22/dotnet-nswag.dll" run /variables:Configuration=Debug" exited with code
-2147450730. Northwind.WebUI C:\Users\Adminuser\Documents\Visual Studio 2017\Projects\NorthwindTraders-master\Northwind.WebUI\Northwind.WebUI.csproj 60
Any Idea how to fix this issue?
Swagger doesn't like it when two or more endpoints in the same Controller share the same name. make use of routing attributes and make sure they are unique.
Try to install NSwagStudio then re open your visual studio.
That's should solve your problem.
If it's still not working
give a look about your output console when you try to compile your project, you should see something like this
1>Executing file 'nswag.json' with variables 'Configuration=Debug'...
1>Launcher directory:
C:\Users\Shadow.nuget\packages\nswag.msbuild\13.1.6\tools\NetCore30
You should have a file called dotnet-nswag.exe in your c:\user...\tools\netcore30 directory.
Put this exe in your environnement path.
Re open visual studio and your error should be gone.

Trying to convert iOS project using WinObjC, but getting missing sys/types.h error

I'm running ....\bin\vsimporter.exe (with default settings) in my project folder and the .sln file seems to build successfully, but when I try running the simulator (on Win32 Solution Platforms, debug build), I get a bunch of errors. Most of the errors involve a missing file from the iOS 8.4 SDK (sys/types.h):
Error unknown argument: '-Xanalyzer'
Error 'sys/types.h' file not found
Error unknown type name 'XSym'
Am I supposed to include the iOS8.4 SDK? Any help/suggestions would be great.
I had the types.h problem too. Try to manually retarget to the Win 10 SDK:
Right-click on the solution and hit retarget, select the latest Win 10 SDK from the list, select all projects and click ok. The types.h problem should be gone.
Retarget answer worked for me to get rid of the errors with missing header files.
To get rid of the -Xanalyzer issue, I removed it from the .vcxproj file as a command line option using a text editor.
For the pods, I manually copied them from a Mac that already had them downloaded.

Unable to build project output group 'Content Files from Web (Active)

I got below error in MS build.
WARNING: Could not find prerequisite 'Microsoft .NET Framework 4 (x86 and x64)' in path 'C:....\Microsoft SDKs\Windows\v7.0A\Bootstrapper\'
ERROR: Unable to build project output group 'Content Files from Web (Active)'
Any suggestions
Thanks
This error came up because my workspace wasn't upto date. I did get force (Get specific version) and rerun the build, it worked !! Posting it may helpful to somebody else.
In your project expand all the Folders and see if there are any files missing with yellow alert symbol.If you delete them,you can build your application as normally.

I cannot add service reference(WCF library) to MVC4 in VS2012

My problem is very simple, but unfortunately I cannot figure out what's wrong. I've created a new MVC4 Internet Application project with Razor syntax, then I added another WCF Library project to this solution. I did not make any change on these codes. However, as I added the WCF project as a service reference in the MVC 4 app, I'm getting 1 Error message and 3 Warning messages:
Error 4 Custom tool error: Failed to generate code for the service
reference 'ServiceReference1'. Please check other error and warning
messages for details. c:\users\vendre\documents\visual studio
2012\Projects\MvcApplication3\MvcApplication3\Service
References\ServiceReference1\Reference.svcmap 1 1 MvcApplication3
Warning 1 Custom tool warning: Cannot import wsdl:portType Detail:
An exception was thrown while running a WSDL import extension:
System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Could not load file or assembly 'DotNetOpenAuth.AspNet,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246'
or one of its dependencies. The system cannot find the file
specified.
Warning 2 Custom tool warning: Cannot import wsdl:binding Detail:
There was an error importing a wsdl:portType that the wsdl:binding
is dependent on. XPath to wsdl:portType:
//wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:portType[#name='IService1']
Warning 3 Custom tool warning: Cannot import wsdl:port Detail: There
was an error importing a wsdl:binding that the wsdl:port is
dependent on. XPath to wsdl:binding:
//wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:binding[#name='BasicHttpBinding_IService1']
I read some article but did not resolved my problem. If somebody know the answer for my problem, please tell me.
THX.
When you add the reference, on advanced setting remove the reuse types checkbox.
If you're experiencing this problem in 2021 with VS2019. Add a folder to the project called "Connected Services"
sometimes you need to create a folder "Service References" in project path. If you dont have this folder it should gives this path error.
If using VS 2019, check if in Solution Explorer you see "Service Reference". Than edit the project file for following
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
In Visual Studio 2019, I fixed the error (system cannot find path specified) by creating a new folder named "Connected Services" inside project folder
In Visual Studio 2022, You need to create a folder "Connected Services" in project path, via Windows Explorer, not Visual studio solution explorer'
You can try the following :
Delete the "Connected Services" folder from the project in Visual Studio
Add the service reference with right-click on the project / Add / Service Reference...
It should work and recreate the "Connected Services" folder with your new service reference.