dotnet build looking for GeneratedMSBuildEditorConfig.editorconfig file? - azure-devops

I'm trying to build a .NET 6 Xamarin iOS app using .NET CLI.
This question is a follow up of this one.
Now the problem is that after a while, the build fails with the following error:
#[error]CSC(0,0): Error CS2001: Source file '/Users/runner/work/1/s/TestApplication/obj/arm64/ReleaseiPhone/net6.0-ios16.0/ios-arm64/TestApplication.GeneratedMSBuildEditorConfig.editorconfig' could not be found.
AFAIK this file is used by Visual Studio and has nothing to do with the .NET CLI.
This seems to be the Roslyn compiler that looks for it.
/analyzerconfig:"obj/arm64/Release|iPhone/net6.0-ios16.0/ios-arm64/TestApplication.GeneratedMSBuildEditorConfig.editorconfig" /analyzerconfig:/Users/runner/hostedtoolcache/dotnet/sdk/6.0.402/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_6_default.editorconfig
EDIT:
/p:RunAnalyzersDuringBuild=false
does not help.
EDIT 2:
This seems to be a new behavior of a .NET 6 build. Originaly, my project is not .NET 6, it has been upgraded to it.

Related

I have a problems with dotnet folder

I wrote a project, I ran cmd, to connect my codes to SQLserver. when I typed dotnet ef migrations add...; It said : that it can't find this 3.1.1 version folder despite the fact that when I asked the version, it would say it is 3.1.1 version.
So i downloaded the 3.1.1 sdk from Microsoft website, I installed it and nothing changed, the 3.1.1 folder wasn't added. I tried to find the folder but I could not.
Suddenly out of nowhere, I decided to download the framework instead. I opened it and it didn't need installation. I just copied this framework and replaced it with the whole dotnet folder which I had problems with😓. The problem started there, again I executed cmd and wrote dotnet ef... It said there is no ef. I again replaced the framework with another one, it said wrong machine, one another time and it said the dotnet image doesn't fit my pc or sth like this. I uninstalled the dotnet and installed it again, it now says an attempt was made to load a program with an incorrect format. I searched this error, they said I should change the 64bit iis to 32bit. I tried but I can't. Iis manager doesn't have the enable 32 bit option for me! And in the other ways folders are missing.
What should I do?
I solved it by first deleting the dotnet folder, then reinstalling visual studio.
Then I downloaded the dotnet sdk for runtime which is suitable for my computer

Bluemix MVC Starter code is not working locally

I started using Blue Mix, and download starter code, but once i tried to compile that in VS 2015, its showing me library not found..
Can someone help with that ?
Rakesh Yadav
The ASP.NET 5 starter code in Bluemix is currently written for the beta3 release and VS may now be trying to use the newer beta4 or beta5 releases. Normally you can change that under your project's properties, but given the major changes between beta3 and beta4 (it wasn't even called DNX in beta3) I don't think it's possible to compile the starter code with the latest VS. The older getting started instructions point to http://go.microsoft.com/fwlink/?LinkId=527980 for VS, I would suggest trying that for now.

C++/CLI and Entity Framework 5

I thought I'd try using EF 5 with C++/CLI in VS2012, so that I could try Code First. The package downloads via NuGet fine, but isn't visible to the solution.
On investigating, the Package Manager says that the package is not compatible with the version of the Framework being used by the solution, and requires 4.0 or 4.5... but the config for the project (a plain Win32 console app) says it is using v4.5.
Has anyone come across this and found a way to fix it?

Using Moles for TDD with HttpWebRequest

I am using VS2010 with SP1 (also have VS2012 installed on the same machine). Moles 1.0
The project is using .NET 4
I added moles assembly to system.dll and get the following error on compile
Error 46 The type or namespace name 'IReadOnlyList' does not exist in the namespace 'System.Collections.Generic' (are you missing an assembly reference?) [C:\Test\obj\Debug\Moles\s\m.g.csproj] C:\Test\m.g.cs Test
IReadOnlyList .NET 4.5 as far as I know.
Anyone else got this issue?
Updated Solution
I was able to get Pex to run in VS 2010 with .Net Framework 4.5 installed. Maybe others have explained that this is the solution but my issue (being new to Moles and Pex) is that many of the explanations were vague. Thanks to the author of these posts because they got me headed in the right direction:
http://feherzsolt.wordpress.com/2013/02/13/moles-and-net-4-5/
http://www.daedtech.com/using-moles-with-the-system-assembly
So the solution is to create a new .moles file (System.moles) in the test project at the same level that Pex created the yourAssemblyUnderTest.moles file and add the following to the file.
<Moles xmlns="http://schemas.microsoft.com/moles/2010/">
<Assembly Name="System" ReflectionOnly="true" />
</Moles>
You may have to clean (or manually delete the obj folder contents) and rebuild but this solution worked for me. I also noticed that the first build would report build errors, but the errors would go away on subsequent builds.
Alternative Solution
I know this isn't THE solution but it is a (poor) workaround that allows Pex to run...plus this was too long for a comment. If anyone knows how to get PEX to run on a machine with the 4.5 .Net Framework PLEASE respond.
This was my scenario. I have a machine with the .Net Framework 4.5 and I have Visual Studio 2010 and 2012 installed. I installed Pex (en_visual_studio_2010_pex_0.94.51023.0_power_tools_x64_598803.exe) and could run Pex in a VS 2010 project that was targeting .Net Framework 4.0. I could run Pex and it identified issues...but once I promoted issues to Unit Tests the unit test project wouldn't compile because of the following build error
The type or namespace name 'IReadOnlyList' does not exist in the namespace 'System.Collections.Generic' (are you missing an assembly reference?)
After much searching, and reading that Pex or Moles was replacing 4.5 .Net Framework assemblies with 4.0 versions I decided to uninstall 4.5, install 4.0, and give it a try. Running on 4.0 works just fine and I didn't need to define Mole type filters to get it to work. Then I tried tried to upgrade to the 4.5 Framework again...but sadly I end up right back where I started with the IReadOnlyList namespace issue.

How to use SignalR in Unity3d? [duplicate]

This question already has an answer here:
signalr unity3d connection
(1 answer)
Closed 11 months ago.
I have a reason to use SignalR in Unity, I have decided to go with Microsoft.AspNetCore.SignalR.Client from NuGet.
I've tried a package Nivot.SignalR.Client.Net35 but it uses AspNet.SignalR.Client which is not used anymore, I have created everything I need on my WebApi solution using Microsoft.AspNetCore.SignalR, then I have changed in my Unity project in PlayerSettings Scripting Tuntime Version .NET 4.x Equivalent and Api Compatibility Level to .NET Standard 2.0, which is compatible with AspNetCore.SignalR.Client.
But after I install the package in visual studio while editing scripts and I try to use it Visual Studio keeps calm, but Unity says That the namespace Microsoft.AspNetCore.SignalR.Client doesn't exists.
I have read that I have to copy them to a folder in the Assets folder, so I did it, and then Unity said "Unloading broken assembly Assets/Packages/Microsoft.AspNetCore.SignalR.Client.dll, this assembly can cause crashes in the runtime" and it doesn't work.
I've lost my hope. But then I remembered that there is Stackoverflow, so now I hope that someone here can help me. Thanks.
You'll have to target .net framework instead of .Net Standard 2.0 in your Unity project because there is no signalr Core out there that targets .Net Standard 2.0 that Unity does. Until Unity updates to 2.2 or 3.0, we're out of luck getting the client side SignalR Core lib working with Unity.
Alternatively, you could try to use a different .net websocket implementation on the client side in Unity.
Your error is related to missing dependencies.
Using the latest stable binaries, SignalR client and server both work in Unity3D. You can find the minimum set of DLLs you need here, in the AspNetCore and AspNetCoreClient1.1.0 directories. Include the associated .meta files. Visit this project's settings for proper configuration.
You cannot use nuget in Unity3D correctly, it is too buggy.