IEnumerable Visualizer option is missing - ienumerable

I'm using the latest version of VS 2022 (Version 17.2.6).
When I create a new (console) application I am able to use the IEnumerable Visualizer.
Visualizer at work
But when I paste this same, simple code into my existing code the option to view the IEnumerable Visualizer is missing.
Visualizer option (View) is missing
I have no clue why this doesn't work in my code, other that it may have something to do with the .Net version of the projects. The first one is .Net 6, the second one is .Net 5.
But, as I understand, that shouldn't make any difference.
Any ideas?
Thnx in advance
Henk

Related

Since the new version of MRTK i cant build a scene

Since i use the new version of MRTK, i get that building error (Unity 2018 3 12f1). How can i fix that?
I had no issues with the old version, but in the old version i couldn't disable the spatial mesh render so it would disappear in my app.
https://imgur.com/h6Xt35h
The other solution would be, to get the spatial mesh render disabled in the old version. So i dont need the new version. But i cant find the menu for that option.
https://imgur.com/f63J1Ip
The only way to find the script is to search for "spatial", but that script is greyed out.
https://imgur.com/Vev0P89
PS: I'm new to this, so please explain it for a beginner.
From the first image you shared, it looks like you need to install the Windows 10 Insider SDK (version 18362 or later). The insider version of the Windows SDK has a few new classes that you need in order to compile for UWP.
https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewSDK
Hope this helps!
okay, i found a way.
For anyone who has also problems with this:
https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/3898#issuecomment-481618334

Can F# be used with Unity (game engine)?

I'm getting into Unity, and wondering if I can use F# instead of C#, simply because I prefer the syntax. I'm guessing not, since the environment it runs on is very different, but maybe there's something that will cross-compile code or something else I'm not thinking of.
I can't help but get the impression that the other answers were written by people who do not really know what they are talking about.
This is what you need to do to use F# in a Unity project:
Create an F# project that compiles into a dll. Have it build into the assets folder of a Unity project.
Add references to UnityEngine.dll and/or UnityEditor.dll. Change the reference properties so the dlls aren't copied to the build folder.
Of course you can't create new F# classes from within the Unity editor this way, but you can assign the ones you wrote in F#.
Currently you need to enable the (experimental) support for .NET-version 4.5. Alternatively you can download an older version of the FSharp.Core.dll that supports .NET 3.5. (see here).
I can't guarantee that you won't run into trouble because of compatibility issues with the FSharp.Core.dll, but that's just a guess since I haven't tested it myself.
I had success doing this sometime back by following this Github project: https://github.com/eriksvedang/FSharp-Unity, which I believe is roughly the same as Lars Kokemohr's answer above. I haven't tested it in more recent versions of Unity/Mono however.
Yes you can use F# as first class language as C# in unity.
Here is an article about it link
an excellent blog for One who want to use F# in unity
if you want to use F# as second class which I recommend.
let me show how to do it.
Usually what I do is to create Game Domain in F# in .net standard
2.0 library project build it.
Make unity API Compatibility level .net standard 2.0 then
Import library project dll in asset/plugins in Unity
Here is an explanation on how to do it automatically after each build : link
You will get this error, here is the solution
Having said that I recommend not to do any serious work in unity with F# because you won't be able to cross compile to other platforms.
Unity uses IL2cpp and it don't work with F#.
In simple words unity don't support F# and if you are having issues like bugs in Il2cpp unity will not fix it because they don't support F#
There is no easy way to do this but if you REALLY want to make it happen I believe you could use something like fs2cs:
https://github.com/hsharpsoftware/fs2cs
In theory you could write a script that calls fs2cs on all of your Unity C# files. Integrating this with Unity itself would be the more challenging part, but in theory you can trigger fs2cs transpilation on save of your file and Unity can use the transpiled C# file.
Only Boo, C#, and UnityScript are officially supported!

Is it possible to navigate to assemblies definitions inside Visual Studio Code

I'm using VS Code several days as MonoDevelop replacement in Unity3D on Mac OS. I installed mono via homebrew as suggested to let VS Code to parse system assemblies. Everything works almost great, but I can't navigate definitions that are not part of my code. For example I can't go to definition of System.String or UnityEngine.Vector3 to see methods signatures. MonoDevelop has Assembly browser but I miss it in VS Code. Does anybody know if VS Code has such feature? Maybe I need to setup something for that?
PS: I've posted feature request. If you're interested in this feature vote for it, please.
https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/14698887-implement-net-assembly-browser
It seems VS Code now can do that with the new extension ms-vscode for C# support. Previously it was recommended to use Legacy C# Support for Unity3D. I don't know exactly if this recommendation is still valid, but I tried to uninstall legacy and to install normal one. After some background work OmniSharp parsed my files and now it can open classes from assemblies! Look at this picture, it has open AnimationCurve class as [metadata]!
I'm trying it with Unity3D 5.5.0b2 beta now, so I'm not sure if this will work with production release of Unity3D. By the way I also removed VSCode plugin from dotBunny out of project as Unity3D 5.5 supports Visual Studio Code self.

MVC 3 & ASP.Net with Entity Framework scaffolding error : No model classes are available

I am trying to use MVC3 with the Entity framework with Code First, but the code Template generation process in MS Visual Web Developer 2010 - is not detecting my Model in the models folder - giving a message - "No Model classes are available" - although I do have model classes for which I want to create controllers.
The templating option I've selected is "Controller with read/write actions and views using the Entity Framework".
I've uninstalled and reinstalled Web Developer 2010, but still having the same error.
Anyone know how I can get around this error?
xixonia's response worked for me. All I needed to do was build/rebuild the project and then everything worked as expected.
Rebuild all did not fix this issue for me... until I closed Studio, reopened and rebuilt all. Then it worked like a charm.
After create models must be build your project.
http://www.asp.net/mvc/tutorials/hands-on-labs/aspnet-mvc-4-entity-framework-scaffolding-and-migrations
I had this same issue and for me I had to go to the properties of the entity model in the entity model designer and change Code Generation Strategy to Default. It had been set to None because I had experimented with a DbContext generator.
I had this same issue.
While digging through my references, just before throwing the computer against the wall, I found that I had EntityFramework version 4.1 installed in the web project (by VS 2010 when the MVC 3 project was created).
I had 4.3.1 installed in the domain project (from nuget).
I uninstalled both of them and reinstalled from nuget.
Now everything is working again.
Hope this helps.
If you still have this problem then follow these steps to fix the problem:
1. Right click on your project and select [Manage NuGet Packages]
2. On the opened popup window, on the left hand pane, select Updates
3. On the right hand pane, at the very top right click on the Update All
During this process, it will ask you whether you want to overwrite the existing references (not sure about the exact phrase). So, say "Yes" to overwrite...
Now try to add the controller to your project and everything will be fine.
Good Luck!

Configure the spark view engine!

I'm looking at launching a new site using the Spark View Engine, I am however having difficulty finding some referance to the set-up of Spark Using VS2010 and MVC2. Can anyone provide a referance to a guide that describes this process?
I've looked at some of the code in the sample but the projects dont convert to VS2010. Before I tear these apart I wonder if there is somthing already out there? I also need to configure Re-Sharper and VS to work with Spark
I have seen - http://sparkviewengine.com/documentation/configuring#AddingtoAspNetMVC
But this it's a pretty basic overview I'm looking for a real world example.
===== Edit
The source provided on DotNetSlackers doesnt run!
Errors with the mismatch of .Net version
"Dynamic view compilation failed.
(0,0): error CS1703: An assembly with
the same identity 'mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' has
already been imported. Try removing
one of the duplicate references."
If I add the latest DLL's to the DotNetSlackers example I get the following
"Attempted to access an element as a type incompatible with the array."
protected void Application_Start()
{
SparkViewFactory svf = new SparkViewFactory();
PrecompileViews(svf);
**ViewEngines.Engines.Add(svf);**
RegisterRoutes(RouteTable.Routes);
}
On the stared line above.
Your "dynamic view compilation failed" error is because Spark hasn't yet been rebuilt to work with .NET 4.0. Your options at this point are:
1) Target .NET 3.5 instead
2) Wait for a new version of Spark
3) Get the Spark source code and rebuild it yourself against .NET 4.0 - see http://groups.google.com/group/spark-dev/msg/028d0cf129c4b1ff for further info
hmm, there are a whole bunch of introductory screencasts on the website:
http://www.sparkviewengine.com
as well as the reference documentation, which is very helpful:
http://www.sparkviewengine.com/documentation/configuring
are you having a specific problem?
I recently did a screen-cast here. Setting up on MVC2 is in the video at 6min40sec if you want to see how it's done.
http://blog.robertgreyling.com/2010/08/elegant-mvc-with-spark-way-views-were.html
As a side note - The source code has now been moved to VS2010 in the master branch and it will also compile views dynamically to .NET 4.0. avoiding the error you got. You can either download the source and recompile the latest binaries, or for your convenience, we added them to NuPack/NuGet if you'd prefer to reference them that way.
Hope that helps