very long run time while developing plugin for nopCommerce - visual-studio

I just started to change a nop commerce plugin using its source code.
Default source of nopCommerce and its plugins plus my plugin includes 27 C# projects. So when I do few line of changes in my code and run to see the result it took about 2.5~4 minutes to show the output site.
I guess there should be some methods that I can only debug my plugin source code without need to load source codes of nopCommerce which impose such a load and causes my site run very slowly.
I mean I need only debug my plugin and I do not need that visual studio load all of nopCommerce for debug but I don't know what is the reason.
My Environment Configuration:
Core i7-4790
16GB Ram
Windows 10X64
Visual Studio 2019 Preview
IIS express
Besides I checked task manager and during build and run usage of resources are at acceptable level and not consumed too much.
I used visual studio tips listed here, and also disabled some features such as IntelliTrace Events however situation did not changed too much.
Summary:
The main question is: "Is it possible to debug nopCommerce plugin without need to load all source code of nopCommerce in Visual Studio and Still have access to run-time debugging feature of Visual Studio".

Related

Visual Studio IDE Error On Launch When Loading Project

I am loading my project into Visual Studio 2019 IDE. When I go into the forms designer within the IDE
Visual Studio Forms Designer has been gives me the following error:
An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch.
There is no code associated with it. All referenced DLLs haven't changed.
Has anyone else experienced this or have a work around as the Google searches I have done have given me to help. Is there a way to narrow down the error? I have also checked all the security dlls to make sure they are correct and are referenced locally to help. Maybe something to do with the CAS policy?
I have also tried on my installed versions of 2012, 2015, & 2017.
UPDATE: Updated the error above as I had the wrong error added.

Debugging Qt program with Microsoft Visual Studio 2013

I created a complex program based on different modules which load after program has started. The program structure is very similar to QtCreator. Frankly speaking I've taken part of code from QtCreator. (plugin management system)
I'm trying to debug my program with Visual Studio 2013. Very often the debugger doesn't show correct values and skip lines of code or jump from a following line of code to the previous line. It seems to me that pdb file doesn't correspond to the proper file. How is that may be possible? Should I set specific or additional parameters for debugging Qt programs in MSVS 2013? What might be the reason of such behaviour of debugger?
ps. I installed Qt 5.4.1 for Windows 32-bit (VS 2013, 705 MB) along with Visual Studio Add-in 1.2.4 for Qt5 (156 MB) properly.
I've made cleanup and rebuild several times, tried to delete related files after compilation - it didn't help.
Go to project property pages-> C/C++ ->Optimization. Set 'Optimization' property to 'Disabled(/Od)'.
Thanks to SaZ!

Visual Studio hangs on "Begin package load [Visual Studio Source Control Integration Package]"

It takes almost full minute to load this:
56 Begin package load [Visual Studio Source Control Integration Package] {53544C4D-E3F8-4AA0-8195-8A8D16019423} VisualStudio 2014/10/14 15:27:31.109
57 Entering function CVsPackageInfo::HrInstantiatePackage {8D316614-311A-48F4-85F7-DF7020F62357} VisualStudio 2014/10/14 15:28:28.380
Besides this there are all kinds of other problems with this installation of Visual Studio, with a lot of hangs and other behaviour.
Can anyone tell me what this Package includes? I am using Perforce as source control. Do I still need this package?
How can I remove this package/feature to see if it solves all my other problems?
Apparently I had Fusion Logging still enabled, and this created a huge slowdown in everything. Disabling the logging fixed my problem.

Word 2003 add in load failure

I've developed an add in for Word 2003 Standard Edition using the IDTExtensibility2 interface using Visual Studio 2008 on Windows XP. The add in runs fine on the development machine. Unfortunately after installing the add in, it doesn't load on the client machines.
The symptoms are as follows:
The first time Word is run after the add in is installed, its load behaviour is changed from 3 to 2 in the registry. Changing the load behaviour back to 3 always reverts the load behaviour back to 2 the next time Word is run.
If you simply install Visual Studio 2008 on the client machine, the add in starts to work. If you subsequently remove Visual Studio 2008 from the client machine, the add in no longer works.
Using vbscript to instantiate the add in outside of Word, the error code 0x8013141A is returned. Looking on the internet this appears to be primarily caused by the assembly not being signed correctly. Using the sn tool to sign the assembly returns that the assembly is not a strongly named assembly.
I've looked at so many possible solutions to these problems on the internet and not a single one has resolved this issue.
The next step is to try to sign the assembly as a strong named one, microsoft provides a guide to do so at this webpage: http://msdn.microsoft.com/en-us/library/xc31ft41.aspx . After you create your keys and successfully complete the procedure you can see if the error still occurs. On a development environment a lot of dll's, assemblies, and protection setting are changed to allow you to execute and debug code. You would need to install a version of the addon with debug symbols and something like the Debugging Tools for Windows for native code or MDbg or coredbg( Lightweight .NET debugger? ) to see what is going on on your reference machine.

Developing in Visual Studio 2010 and Sharepoint 2007. Using new SPSite throws errors

I'm re-writing a console application using Visual Studio 2010. The original application was written using Visual Studio 2008 and works OK, but has no tests associated with it. Hence, the idea of re-writing it with tests.
Both applications are working with a Sharepoint 2007 site.
The project compiles but when I try and run it the code below is throwing errors.
SPSite spsite = null;
SPSecurity.RunWithElevatedPrivileges(delegate() {
spsite = new SPSite("http://sharepointdev");
});
return spsite;
I'm running this on Windows Server 2008. I've set the platform target of the build to be x86 (this is in the properties of my project) and in Security I've checked that this is a full trust application. I'm also running the project as an administrator. I've also set the .NET Framework to be 3.5
Is it just a case that SharePoint 2007 just doesn't want to play with Visual Studio 2010, or is there something else I've not yet considered?
I've tried searching on the web and stackoverflow but all the articles I've seen deal with trying to get Visual Studio 2010 to work with Sharepoint 2010.
The exact error I get is 'Object reference not set to an instant of an object' with the debugger high-lighting the SPSecurity call.
If I just use this code
using(SPSite spsite = new SPSite("http://sharepointdev")){
Then I get a FileNotFoundException, which isn't exactly true! I've got plenty of applications that do find a site using that URL. What I suspect the error message is trying to say is that my 2010 application is not being allowed to access the site, but I've not found any clues as to why that should be.
Any clues, hints or suggestions gratefully accepted.
EDIT
I've lifted the code from my VS 2010 project and dropped it into a new VS 2008 project and it ran straight-away.
FURTHER EDIT
I created a simple little console application in VS 2010. By default it uses .NET Framework 4, I had to set this to .NET Framework 3.5. I also set the platform target to be 'Any CPU' and it works. This makes me wonder if there is an issue with the Test Project associated with my first application?
I re-created the console application but this time without a Test Project associated with it (the test project was a class library and worked with NUnit). It ran with no problems. I guess the problem lies within the test project and something there that the solution doesn't like. Probably there's a build there it doesn't like
TL;DR; answer: Switch to Any CPU build - don't choose x86.
I've run into this problem before with a console utility. I got the same FileNotFound error but it's referring to the DLL, not your SharePoint site. Digging a bit I discovered a deeper error of BadImageFormat and realized it was complaining about a DLL or EXE. I guessed it was due to the linking from x86 to MSIL. There's a lot of things that have to happen to marshal calls between the two and I guess it led to an incompatibility. When I switched it (and verified all my support library projects) built to MSIL/Any CPU the application worked with no problems and no other changes.
I use Visual Studio 2010 to develop for SharePoint 2007 all day for a long time now and the only problems I've encountered aren't related to that combination. More often than not it's a quirk of a 3rd party add-on I'm using. For almost all of my development I start with the WSP Builder templates but they are buggy and have a few quirks you have to work around (some severe enough to take down your SharePoint server) so I don't blame VS 2010 directly.

Resources