Use ModelsBuilder with Jetbrains Rider (no autocom...
# help-with-umbraco
d
Hi guys, today I tried to refactor my Code to use ModelsBuilder. As far as I've seen people use Windows older then Visual Studio 2022. Becuase for the newest Visual Studio the Github Issue's say its not been ported yet. And now I wonder how I can get ModelsBuilder to run on macOS with Rider? Shouldn't the thing not be that with ModelsBuilder you can autocomplete the properties names? I can access my data via:
Copy code
csharp
@Model.MyProperty
but there is no autocomplete. It looks like this in Rider: Has anyone an idea if this is default behaviour or only because I don't use the older Visual Studio with the ModelsBuilder Plugin available? How do you people handle this case? It would be very handy having the autocomplete available, and therefore I'm asking... Kind regards, Daniel
p
@User May I suggest β€œUmbracians” instead of "guys"? We use gender inclusive language in this Discord. πŸ˜€
m
I assume your using InMemoryAuto which any ide can't access as the site needs to be running. Using one of the SourceCode options https://docs.umbraco.com/umbraco-cms/reference/templating/modelsbuilder/configuration Creates cs files which your ide can then process and you can commit to git
k
Yeah, use a SourceCode mode (we use Auto, had no problems with that) and remember to generically-type your views (e.g.,
UmbracoViewPage<MyModel>
). This is not related to Rider, it works exactly the same in Visual Studio. I've never heard of the ModelsBuilder plugin and don't know what it would help with, so I may be lacking some information there though.
m
the plugin was for the orignal Modelsbuilder before it became part of Core
s
There used to be a Visual Studio plugin as well, not sure what it did.
m
It was for API mode in the "full" models builder its basically SourceCodeManual without hitting a button on site
k
Sounds an awful lot like SourceCodeAuto. πŸ™‚
We used to use SourceCodeManual, I can't remember why. Not going back.
s
With Auto your app kept recycling for every little update to a doctype (in v8 and below). Now, this is not a problem any more since .net doesn't recycle on it's own. But you will need to stop/start if you want to use new properties on a doctype (or elsewhere).
d
Thank you all for helping out, I wasn't sure how this whole thing is supposed to work and therefore I asked this question here. I Had to change to SourceCodeAuto and rebuild the application, now it works as supposed to be ... πŸ™‚ Thank you kind people! πŸ™‚
a
Welcome to team Rider ! πŸ˜„
d
@Ambert Tried first naturally Visual Studio, but they don't even have autosave on focus lost on macos, so I had to change to Rider. simply works like a charme! πŸ™‚
s
VS for mac has just been cancelled anyway. Unless you used VSCode
d
@Sebastiaan for real? I did not hear that? why? The launched it a few years back, but the discontinue it? I'll have to google that, thats intresting... Never was a big fan of it on macOS but if you don't want to pay for Rider Visual Studio is free ...
s
Visual Studio Code is free. But the full Visual Studio pronbably wasn't (no idea, I like Windows).
d
@Sebastiaan Yeah I read right now that they discontinue it on heise.de ... it was communicated 31.08.2023 ... Visual Studio is in the basic Version on macOS AND on Windows free! We allways used the community Edition because we didn't need the enterprise one ... Thank you for telling me this news, I hadn't it on my radar! πŸ™‚
s
FYI: you can only use the community edition if you do not make any commercial software with it. Personally, I've only ever made open source software with it, but many other people don't, of course.
m
https://visualstudio.microsoft.com/license-terms/vs2022-ga-community/ unless you are an individual or organisation < 5 individuals?
a. Individual License. If you are an individual working on your own applications, either to sell or for any other purpose, you may use the software to develop and test those applications.
vi. If none of the above apply, and you are also not an enterprise (defined below), then up to 5 of your individual users can use the software concurrently to develop and test your applications.
It's so difficult to read these licenses... and do we not develop in VS Community and then distribute via MSBuild in github actions say? πŸ€”
d
We were back then only a group of 4 developers so I guess we were in the right to use the software in the community edition... πŸ™‚