Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(442,5): error : Two assets found targeting the same path with incompatible asset kinds - asp.net-core-3.1

C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(442,5): error : Two assets found targeting the same path with incompatible asset kinds: [D:\Migration\XXXXXX\XXXX.App\XXXX.csproj]
C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(442,5): error : ‘D:\Migration\XXXXXX\XXXX.App\wwwroot\assets\images\AAA.png’ with kind ‘All’ [X:\Migration\XXXXXX\XXXX.App\XXXX.csproj]
C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(442,5): error : ‘X:\Migration\XXXXXX\XXXX.App\wwwroot\assets\images\AAA.png’ with kind ‘All’ [D:\Migration\XXXXXX\XXXX.App\XXXX.csproj]
C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(442,5): error : for path ‘assets/images/Cancel.png’ [D:\Migration\XXXXXX\XXXX.App\XXXX.csproj]
0 Warning(s)
1 Error(s)
Error occurs while building the Solution. Not sure why this error is happening in .NET 6, the same copy of wwwroot folder content to output directory works fine in .Netcore3.1. But giving error in .Net 6.
Did initial research on any other alterative for this problem. It only builds if content of wwwroot folder are deleted each time in the project directory location. hence works fine on the first time of clean workspace.
Background: basically need to copy the icons and images used in client to wwwroot folder and also copying this to output directory using
Sample mini project is in git https://github.com/Shruthi1984/StaticWebAssestscopyissue .

Similar error propped up in our project after upgrading to net6.0
Project had a .nuget package reference to said static asset(i.e bootstrap), and also files under wwwroot folder. The duplication made the project to throw error. We removed the reference to package. And that solved the problem.

I had the same problem after updating from .net5.0 to .net6.0. The error happened because I had this command in the project file:
<Content Include="$(ProjectDir)\wwwroot\**\*.*" CopyToPublishDirectory="PreserveNewest" />
After removing it I was finally able to build the project, because in .NET 6 the copying is automatically done and it will try to copy the files twice with this command

Related

Firebase Database in Unity with REST API

I am trying to create a connection to the Firebase Realtime Database by following this tutorial: https://medium.com/#rotolonico/firebase-database-in-unity-with-rest-api-42f2cf6a2bbf to understand how it works and modify as I go. However, I am getting the following errors (these are just some of the errors):
Assembly DLL name is reserved for internal use: Assets/UnityEngine.dll (did files generated by a build accidentally end up in your Assets/ folder?)
C:\Program files\2019.4.20f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\FontData.cs(135,16): error CS0433: The type 'TextAnchor' exists in both 'UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'`
C:\Program Files\2019.4.20f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\InputField.cs(241,10): error CS0433: The type 'SerializeField' exists in both 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
These errors are populating when I did the following steps:
Navigate to the Build Files (DLL) folder.
Open CommonData.csproj in your favorite text editor.
Change the UnityInstallFolder value on line 6 to point to your Unity installation directory
On OSX this is likely /Applications/Unity/Editor
On Windows this is likely C:\Program Files (x86)\Unity\Editor
Double click FullSerializer.sln to open up the solution
Run a build-all (F6 in visual studio). Alternatively, you can right-click any of the three projects to build only one of them.
FullSerializer - NoUnity builds Full Serializer so that you can use it outside of Unity.
FullSerializer - Unity builds Full Serializer to a DLL
FullSerializer - Unity - WinRT builds Full Serializer with WinRT APIs (if you're targeting the Windows Store or the Windows Phone export platforms)
You will find the DLLs inside of the Build folder. Please add them to your Unity project's Asset folder.
Here is the path where unity is installed:
C:\Program Files\2019.4.20f1\Editor
I opened the FullSerializer.sln, and build one of the three projects, and so on.
I am not sure what I am doing wrong. Any help would be appreciated.
I was able to determine the issue. It appears that although the instruction suggests adding the source folder in the assets folder of the Unity Project, I remove it from there and put it in the same level as the assets folder. That resolved the issue. Hope this helps anyone else who has encountered this issue.

Error: Cannot find module 'C:\project\node_modules\cucumber\bin\cucumber'

I am creating protractor cucumber project using TypeScript. While trying to run my cucumber test in protractor I am getting below error message. I have installed cucumber globally as well in the root of my project folder. Still getting same issue. :
Below is my bin folder structure. I do not see any 'cucumber' file or folder. However, I do see cucumber-js file. When I copy cucumber.js file from dist folder the error goes away. But that gives some other errors.
bin folder contents:
cucumber-js
run_slave
Because there are issues with cucumber v4.2.1 on windows 7 64bits.
For now please try the following:
Delete the existing cucumber folder from your "../project/node_modules"
Run "npm install cucumber#1.3.3." in "../project/node_modules"
Try executing your scripts now Check if the issue persists!

Compilation error: openFile: does not exist (No such file or directory)*

When I attempt to compile the Main.elm file (via Ctrl+F5) using Visual Studio Code, I receive the following error:
Error:
elm-make: c:\Users\Bizmonger\Documents\Visual: openFile: does not exist (No such file or directory)
Note:
I am trying to compile an Elm solution that I cloned from GitHub.
Here's the parent directory:
Here's the src directory with the elm files:
Why am I receiving this error?
The error message looks like it truncates the folder name after Visual, but I'm assuming you're in a folder called something like Visual Studio Projects. Try moving the project to a folder tree without a space in the name.

Oprofile not finding libraries

I'm trying to use OProfile on Eclipse (3.8). The Juno version of oprofile didn't work, so I installed the Luna one. This one at least starts up, but can never find the libraries.
Here is the error:
ns3-dev-lena-profiling-debug: error while loading shared libraries: libns3-dev-lte- debug.so: cannot open shared object file: No such file or directory
profiled app exited with the following status: 127
I know that that means I need to add the library path. So I went to Profiling Tools Configurations, and specified the path under environmental variables as:
name: LD_LIBRARY_PATH
value: {workspace_loc:ns3dev2}/build (appended)
I manually checked and the library is located in the build folder. Furthermore, this library path works fine if I debug the same project instead (or run it...).
I've deleted the configuration and remade it, but it's the same error.
I also tried adding the same path to PATH instead of LD_LIBRARY_PATH, but that doesn't make any difference. (Just tried it for the hell of it).
Any thoughts?
Edit, I get the same problem on Eclipse 4.4 (Luna). I found the logs for the errors and the error is:
!ENTRY org.eclipse.linuxtools.oprofile.core 4 0 2014-10-27 12:33:07.200
!MESSAGE opreport process error output: warning: /no-vmlinux could not be found.

iphone: Building error precompiling app_prefix.pch

I dont know what happened to Xcode. I was debugging my app when after a while of writing some code I tried to compile and an error message appeared:
Building error precompiling app_prefix.pch
arm-apple-darwin9-gcc-4.2.1: te: no such file or directory
I had never this error before, and I am not sure how to solve it.
Did you move your [Project Name]_prefix.pch file ? If you moved it to say, a subdirectory of the project's parent, you need to open up the target Build settings for each of your targets by double clicking on them, do a search for "pch" in the build settings, and update the path to the .pch file.
For example, if you moved your .pch file to a subdirectory "Core" which is in the project parent, then you'd change "[Project Name]_prefix.pch" in the build settings to "Core/[Project Name]_prefix.pch".
Try to change the buid setting of the target in project propertys:
Change the option Precompile prefix header to "NO"