Subsonic in a VS2008 Add-In woes - subsonic

I am writing a VS2008 add-in that connects to a remote database blah blah.
I am having a problem with the app.config in this project. When I use SubSonic in my code, it moans that is cannot find the SubSonicServer section. This is because the .config file cannot be found.
This appears to a problem with paths as the add-in is a DLL running in the context of VS2008 and the working directory is C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE.
Is there a way to get the app.config to deploy properly with the application so my add-in (and SubSonic) can find what it needs in the .config file, or is there a way to get SubSonic to work without the need for the .config?
I am very experienced in SubSonic projects now, but only winforms, web, web service, and WPF applications. This is the first time I have tried to use SubSonic in a VS2008 Add-In project. I also have AppSettings in the config file which the ConfigurationManager cannot read because it cannot see the .config file.
2AM now and brain is tired of trying to figure this one out. Hopefully there is an answer when I wake up :)
TIA

My suggestion would be to not use the app.config file and inject the parameters at runtime.
I use this approach in my Subsonic 2.2 project:
http://www.digvijay.eu/digvijay.eu/post/2008/10/31/SubSonic-Trick-Specify-connection-string-at-runtime!.aspx

You might want to have a look at the answer to this question which deals with configuration for add-ins:
How to use app.config with Visual Studio add-in?

Related

Why does visual studio need a solution file for nodejs projects?

I wanted to make a nodejs application that could be edited using IDEs/editors other than visual studio, and was wondering why a solution file was needed, as dependencies are managed by npm.
The solution file holds a lot of data to setup your IDE. Most IDE's store some project specific data in your project root. The solution will just map out the actions of the run/debug actions, and specify other project specific parameters.
Because solution file contains reference of assembly files and other dependencies. You can check it by opening solution file in notepad.

Code Analysis Using VS2012 - Missing Dll References / GAC

I'm trying to run code analysis on my project and I'm plagued by lots of DLL resolve issues.
I've already Added a few dlls to the GAC using gacutil and solved a few issues that way, however I'm seeing an error regarding a reference to System.Net.Http version 2.0.0.0.
I don't have a single reference to this DLL in my solution, I don't have this DLL anywhere on my machine in fact, only version 1.0.0.0 or 4.0.0.0.
I do have a binding redirect for this dll in my config file for the web site but obviously the code analysis process isn't using this.
I'm not sure how best to proceed with this. Can I configure code analysis to use the binding redirects? Or do I need to go hunting for DLLs online in order to GAC them?
Would appreciate any ideas, thanks.
I decided to just GAC version 1.0.0.0 and code analysis is now working fine ...

OrchardCMS pull down to visual studio

If I have a version of Orchard installed on a server via Microsoft Web App Gallery from my hosting provider, Is there a good way to pull down the instance of orchard for local visual studio development?
When doing Visual Studio development, always use full source from Codeplex. The WebPI package is intended to use out-of-the-box when you don't want to perform any coding.
In your case it's quite tricky, though, but doable. The best approach would be to
Grab the full source as described here,
Grab the source from your server
Copy the files from 2. to src/Orchard.Web subdirectory found in 1. (overwriting any existing stuff)
Open up the /src/Orchard.sln solution in VS and add references to any custom modules you had on your server (2.) that are not in the Orchard core (1.). You will find those under the /src/Orchard.Web/Modules subdirectory.
I'd go with Piotr's answer, but if you just need to make some tweaks then the code from WebPi should work okay with WebMatrix.
I wouldn't use this solution for module development, but if you just want to tweak a simple theme or run the site locally then it's worked for me.

SharePoint development and SpecFlow on the same machine?

I need some guidance on how to have SpecFlow installed on my Visual Studio 2010 development machine which is also leveraged for SharePoint 2010 development.
The .feature extensions causes some bad behavior...
I just posted a version of SpecFlow that resolves this issue. You can get more info in this post.
What I had to do to resolve the issue was download the source and change the extension for the feature files to .sfeature.
I think the problem here might be that SharePoint 2010 and SpecFlow make use of the .feature file extension. I did some research into this and found a SpecFlow Google group query about a similar problem. The answer given to the user with the problem was:
Hi, I'm sure you know the SharePoint
project better then me. Do you see
any conceptual idea how this conflict
could be resolved? What parts are
conflicting, the syntax coloring or
the generation? Is the SharePoint
".feature" file can also be placed in
a normal c#/vbnet project?
Tips for
manual workarounds: to switch off the
automatic recognition of the .feature
file for the
genrator:
- rename key ".feature" to ".featureX" at "HKEY_LOCAL_MACHINE\SOFTWARE
\Microsoft\VisualStudio\10.0\Generators{FAE04EC1-301F-11D3-
BF4B-00C04F79EFBC}.feature" (this is
for C# projects)
you can still set the generation manually in VS by specifying
"SpecFlowSingleFileGenerator" for the
"custom tool" property of the file
to switch off syntax coloring:
remove (or rename) the shortcut at C:\Program Files\Microsoft Visual
Studio
10.0\Common7\IDE\Extensions\TechTalk\SpecFlow
Br, Gaspar
Maybe you could try the registry hack mentioned above and that might let you use SPecFLow with SharePoint?
The original thread can be found here:
http://groups.google.com/group/specflow/browse_thread/thread/4e6a80f3aa3624c2?pli=1

installshield sharepoint deployment

I am new to sharepoint and installshield. My responsiblity is to build and deploy the sharepoint solution as a package using istallsheild. Previously I was using solution package wsp and content database restoration. But now the client wants to deliver the total solution i.e. dlls, ascx files, xml files, servce files(.cs), feature files using installsjield from development server to another (test and/or client) server.
Can any body help me on this: how to do the sharepoint deployment using installshield?
thanks in advance.
I presume you are using SharePoint solutions to package dll's, ascx and xml files for deployment to a sharepoint server. These solutions are built using a tool like WSPBuilder.
If not: YOU SHOULD!
If so: Why not use SharePoint Installer? It is an installer wrapper around a .wsp (SharePoint solution) file. It will check for the existence of a sharepoint installation, if the required services are started etc.
For deployment to a test machine: Why would you need the .cs files? If you want to test (debug) code on a test machine, I suggest you use either continuous integration using a tool like CruiseControl.NET, or just install Visual Studio on the test machine (which I presume to be a dev test, not a client test machine) and get the latest version, do a build, then roll out the solution.
And what do you mean with "client" server? is there some windows app that's communicating with sharepoint included in the installer? If so, I suggest separating the SharePoint solution from the actual windows app. They might share DLL's but are not supposed to be in the same installer.
We are using a tool (open source - saf.codeplex.com) to automate the Sharepoint components using MSBuild/Features/STSADM etc. Recently they have upgraded this to use WIX so that we can deploy any SharePoint components.
saf.codeplex.com
It has got an very good documentation and also we got a good support in fixing and implementing the SharePoint automated deployment in our premise.
Thanks
BalamuruganK

Resources