hello, i have just downloaded and installed the new visual studio 2017 community edition, after install and run it for the first time, i just went to unity 5.5.2 → edit -->preferences and i didn’t saw it in the editor select tool.
then i tried to force it, choosing “other” in the dropdown list and pointed to the devenv.exe in the right folder but it didn’t show at all, it keeps opening my visual studio 2015.
any idea why is this happening ?
is this happening because i installed the visual studio 2017 and the unity was installed before ?
if i uninstall the unity and install it again it will detect my visual studio 2017 editor ?
thanks in advance for all your help.
p.s.: sorry if this is not the right forum to asking this.
Sounding like Unity isn’t set up for the new Visual Studio… Perhaps uninstalling 2015 might work? If it keeps opening 2015 up then it must be reverting to that one. Only way to be sure is to try. (Yeah I know - takes forever to reinstall if you have too). But gotta try all your options lol.
Works on my machine, and im on unity 5.5.1f1. Just select monodev, and reopen the preferences, that point it to VS 2017.
the default path is
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe
i fixed the problem, i uninstalled visual studio 2015 and unity 5.5.2, after that i have reinstalled unity 5.5.2 and it saw the new visual studio 2017 ide.
Yeah that is weird. They can be installed in any order. The unity installer can install visual studio and the visual studio installer has an option to install unity.
works fine here (5.6b11) … I just installed the vs game unity stuff in the installer but took off the optional unity installation (adds like 5gb extra to the install if you don’t untick, which you don’t need as the updated vs tools is installed anyway and you will most likely have unity already on)
Anyway I first installed vs2017 with 2015 still installed… and unity worked fine with opening the project in 2017 after changing it in the preferences… ofc I later removed 2015 and then noticed on vs 2017 the extensions manager was not working anymore because extensions were looking for vs15 even though vs2017 is on… MS fking shitty unstinallers strike again. So had to do a full clean wipe of all vs using another tool and another install of vs2017 later it worked again. Its a shame MS like putting there shit everywhere on a computer and can never keep track of it themselves to remove properly. Must be so hard to make a portable software for them that just works without needing to infest an entire machine with its shit everywhere… no wonder they can’t get installations and uninstallations working properly still. I#m sure when I go back to modify the install to put the rest of 30gb of stuff I’ll be needing to use later on, it will most likely break something else. And also getting QT setup again that last time getting that to work with vs ide was a pain in the ass.
Also shame they couldn’t be bothered to make the new roslyn auto bracefixing part of the code format ctrl+kd option… I was really hoping for a quick way tidy up up the open source stuff I use in some of my projects where people can’t be bothered to use braces for if else conditions etc, or worse mix and match them whenever…so the autofixing stuff only works if you manually do it per condition… at which points it’s fking faster to do fix it myself manually until I have to sync code again.
Hmm took a look, it seems it was more of a last minute half baked implementation to vs2017 changes aren’t even instant if you edit the editorconfig file and try test ctrl+kd on a document, you have to reload any file again before ctrl +kd will format with the new editorconfig changes.
The other thing is that it does not supporting adding for {} to conditions like the below … indent_brace_style (doesn’t work )… ie to format this whitespastic schematic python looking fking shit style…
vs2017 roslyn stuff only supports fixing this stuff per condition with alt+enter enter, but its per condition/line… so it won’t even fix a complete if else statement… only the if part… and you have to do it again if there is an else part to it… lol talk about half baked implementation. I mean its literately faster to fix it myself manually until they implement this stuff as part of the format document stuff, while the Code Style in the tools options shows an option for Prefer Braces for suggestions and warnings displays, its a shame its not part of the Formatting part yet, so its somewhat implemented just not fully.
Also found this GitHub - madskristensen/EditorConfigLanguage: A Visual Studio extension which adds much better features… honestly for an official implementation it’s pretty lame MS couldn’t even bothered to include the .editorconfig file in the new item menu when adding files to projects let alone actual intellisense support for all the rules it does actually support or as in the official case does not.
The full spec has not been implemented yet, it’s new to VS2017, but the plan is to have the full EditorConfig spec implemented through updates of VS2017.
Honestly, I don’t think it’s necessarily the IDE’s job to prevent people from writing crappy code. You could install Resharper and tell it to fix the braces solution wide.
No idea just have to take a look at github, I use a few opensource projects where the author mixes and matches braces for conditions… its annoying fuck to look at, work with or sync with personally, and on a few occasions has lead to bugs with code not enclosed in braces. As much as I can’t python it at least enforces whitespacing as part of schematic…even if it is shitty language design imo… but in C? fuk no. what next ‘if this that’ ooh cool just start writing on forums without using fullstops and cut all grammer out aswel because I really enjoy interpreting someones shit styled code personally
I hear resharper has support for auto adding braces to conditions?
You missed my reply above, but yes… and I think you can escalate it even to “error” to enforce coding style… then when fixing one, click the dropdown by the light bulb and tell it to fix in the entire solution.
just use ReSharper, to do this, also it should just be on hint, going full error for stuff like that is stupid. The important part is if the code works.
A agree braces should be included with if statement in most cases, but i am also guilty of doing
if (!condition) return;
A lot as well, i would not want to be forced to change my formatting on that.
Also i would not call it python looking, if you remove the braces from a if in C#, it only includes the first statement in the if, dosnt matter if its same line or indented or not.
I think the point is that he’s pulling some open source stuff and wants to modify it locally to match his own code style, so setting it to Error is not a bad thing. Also, if you’re working with a team, setting this things as Error is important to enforce code style consistency. As a consultant I’ll run into this a lot because different clients will have different code standards so I have to adapt to their way of formatting.
Personally don’t think a license for reshaper is worth it just for brace fixing.
I don’t mind braces not being there when its inline as much as when the codeblock goes down in lines… and only gets harder to follow the more codeblocks and larger the code is… at which point braces really help ide color highlighting and quicker readability. And I’ll often leave cursor to select a brace to visualize the encompassed codeblocks quicker just adds more clarity at a glance imo.
if (!condition) { return; }
…Purely for consistency with surrounding code that uses braces and my own preference, mixing and matching styles to save a few lines seems less useful and if you expand on those area you end up having to put in the braces anyway.