Where are the MVVM Light snippets? - mvvm-light

It seems that snippets of MVVM Light are not installed when we use Nuget to install MVVM Light Toolkit.
Where can I find them ?

Snippets are available on GitHub.
Download the code (upper right Clone or download button) and extract it.
Use the Visual Studio Code Snippet manager (from the "Tools" menu) to import the snippets located in the Installer/InstallItems/Snippets/CSharp folder of the extracted code.

For anyone else who didn't find C# snippets in the download specified in the accepted answer, you can download MVVM Light extension
for VS2015 (as well as for VS2013 and VS2012) from this link.
for VS2017 from this link.
This not only installs C# snippets for you, but also the relevant Project and Item templates.
The download works with the Community Edition of VS2015 too.

Related

Xamarin.Forms: Using open source code instead of the nuget package to debug

I am using this nuget package
https://github.com/jamesmontemagno/MediaPlugin
It is available for both ios and android in pcl.
I am using it to make videos in my app.
Unfortunately, it has issues on iOS that are inside the project, not inside my code.
I am therefore trying to debug the project, not just implement the nuget library.
It does work fine on Android, so all I want to change is the iOS part.
Unfortunately, I dont know how to insert the same library when it isnt a nuget package but just the solution and also how to then adress it from pcl code.
I havent found a solution on google, but probably I dont know how to describe the problem well enought.
How can I debug an open source nuget package?
Thank you
Download or clone the src code,
Go to your project in VS,
Right click on your solution, choose Add -> Existing project,
Navigate to MediaPlugin-master\src\Media.Plugin and choose Media.Plugin.csproj file,
Right click on your iOS project (or whatever project where you use the plugin), choose Add -> Reference,
Check Media.Plugin and click OK,
Now you should be able to use the plugin in your project code after adding using Plugin.Media; (and the code of the plugin will be available to you).

Visual Studio 2019 F12 to decompiled source for .NET Core projects

I very often use the Visual Studio F12 to decompiled source feature. When I do this against framework classes in a .NET Core project I very often end up looking at some sort of reference assembly that has no implementation code, just stubs, e.g
Is there any way of getting it to go straight to the actual implementation code instead?
So you see at the top where it lists .Ref at the end of the package name? I'm not positive but I suspect this is trimmed down version of the DLL that doesn't include the full source.
If you search for the dll elsewhere you should be able to find the dll with the full source and decompile that with a standalone decompiler.
So for your example you can find the full dll at C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App\3.0.0\Microsoft.AspNetCore.Authentication.Cookies.dll
Personally I prefer using the free decompiler offered by JetBrains called dotPeek. It allows you to navigate directly to the decompiled source using F12, however this will only lead you back to where you are stuck now. BUT if you open the path I listed above for the full DLL and open that in dotPeek, you'll get the full decompiled source code.
As far as I know there's no way to lookup the actual DLL via keyboard shortcut inside the IDE, you have to find the DLL yourself and open it in a decompiler.
Assuming you've downloaded the ILSpy visual studio extension...
There is a way to decompile using a keyboard shortcut.
Tools->Options->Environment->Keyboard
Press a set of keys for the keyboard shortcut. (I used ctrl i l).
Click Assign->OK
Pressing the above keyboard shortcut will now open the selected code decompiled in a new window of ILSpy.
I have a partial solution for this. It's partial because still the Go to Definition (F12) won't work for it, but the Step Into (F11) option while debugging can successfully step into the actual .NET Core, not just the stub.
The feature is called Source Link, I hope it helps.
They are still working on this feature. There's a github issue for it.
You can do this if you have JetBranis dotPeeK installed and you cannot see the decompiled file when you press F12 or Ctrl + F12 :
Go to Tools > Option > Resharper Options > External Sources : then enable Decompile Resource

Update bootstrap in an asp.net core web application + Angular project

I have created a sample project using Visual Studio 2017. The project is ASP.NET Core Web Application with Angular (the Angular template comes with the latest VS2017). The project was created and is working great.
I would like to update the bootstrap to the latest - what would be the best way to do that? I have tried copying over, importing in _Layout.cshtml and Index.cshtml but fails...
I am pretty new in this area, so any help would be greatly appreciate.
Thanks
Working with an empty solution here, but should be the same.
In your solution explorer, under Dependencies, there is a "npm" folder.
Right click on the folder and click "Open package.json"
Find "bootstrap" under devDependencies, and change the version to the one you want.
Pressing Ctrl+Space should show you the latest stable version if you just want the latest
If it doesn't automatically update the package for you then:
Go back to, and open the "npm" folder in the solution explorer.
Find bootstrap, and right click and select "Update Package"
Let me know if I missed anything.

eclipse does not find bootstrap css in jsp

i am developing dynamic web project with bootstrap templates every thing is working fine even view is rendering perfect.
in home.jsp file in which i have link css(bootstrap files & my customized files) file
<link rel="stylesheet" href="<c:url value="/resources/bootstrap/css/bootstrap.min.css"/>">
but in my code when i press ctrl+space it does not show me suggestion for css classes in
<div class="..">
i am using eclipse neon please help me thank
Depending on which Eclipse package you installed you may already have the CSS and HTML editors. If you don't then you can install them using Help > Install New Software. Choose the software site for your version of Eclipse in the drop down list and look at the Web, XML, Jave EE and OSGi Enterprise Development section. The Eclipse Web Developer Tools section contains the editors you want but the other sections may also be of interest.
And if this plugin for eclipse will work for you
Researching this a bit and reading over your comments it seems that you are using Eclipse with the Aptana extension. If you absolutely do not need to use the Eclipse environment you could now download the Aptana Studio 3 which is based on Eclipse. It looks just like eclipse but is Aptana. Now instead of entering this and looking for Aptana plugins you are going to go into Aptana and look for eclipse plugins. I've installed this myself and have installed several plugins that handle all sorts of things such as javascript code completion, source code formatting etc.
If you go to this site http://www.aptana.com/ you can download the software there. To get all of the plugins, you can do use this site to guide you through some terrific source code completion utilities as well as others. http://jebaird.com/2012/11/02/useful-plugins-for-aptana-studio-3.html

Which is the correct web site to download Moq binary files?

I want to play around with Moq framework. I wanted to download the framework, so I reached http://code.google.com/p/moq/ through google, but the first line mentions that this project has been moved to GitHub. When I went to GitHub I see only the source code. My questions are :
1) Which is the correct web site to download Moq binaries.? (I do not want Source code.).
2) Why am I not able to view the binary files in the GitHub website for Moq. Is it that I need to download the source code and then compile it myself.?
3) Should I only go to GitHub website in future for any updates. Currently code.google.com/p/moq provides binary files.
The moq project now moved to github. The quickstart is also now on github
So to answer you questions:
You can get the latest version from nuget: http://nuget.org/packages/Moq/
Or download the latest binaries from github: https://github.com/Moq/moq4/releases
At the moment you can still download the old moq binaris from the Downloads page: https://code.google.com/p/moq/downloads/list (you can use to search filter if you are looking for older versions) or you can use
In the future a who knows where it be hosted, because it is an open source project you can create you own fork and maintain it to make sure that it will last until you need it.

Resources