Visual Studio 2013 Update 4 - Tools and Extensions Not reaching the internet - visual-studio-2013

I've just updated Visual Studio 2013 with Update 4, and my tools and extensions manager isn't able to connect to the internet.

So, I thought I would post my solution to this annoying problem.
My proxy settings for access behind my company's firewall had been removed with the update.
Go here:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE
find this file
devenv.exe.config
edit system.net to include this:
<system.net>
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy proxyaddress="http://yourproxy:8080" />
</defaultProxy>
<settings>
<servicePointManager expect100Continue="false" />
<ipv6 enabled="true" />
</settings>
</system.net>
Note that you'll need to edit this in a text program that you run with admin permissions.

Related

Permanently remove machine-wide package source

I've recently uninstalled Service Fabric and its SDK from my machine. However, it has left behind a machine-wide package source:
Microsoft Azure Service Fabric SDK
C:\Program Files\Microsoft SDKs\Service Fabric\packages
This folder no longer exists. It is causing my build to fail. Unticking this option as an available source doesn't seem to persist between sessions.
How can I permanently remove this package source?
UPDATE
In the Visual Studio options, delete is not available for this package source. I can untick it, but that doesn't seem to be persistent.
My NuGet.config doesn't reference it either. I can't find another NuGet.config on my computer.
%AppData%\NuGet\NuGet.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Microsoft Visual Studio Offline Packages" value="C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\" />
</packageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
<packageManagement>
<add key="format" value="0" />
<add key="disabled" value="False" />
</packageManagement>
</configuration>
I found that deleting this file (as an Administrator) solved the problem. It must have been missed by the Service Fabric uninstaller.
C:\Program Files (x86)\NuGet\Config\ServiceFabricSDK.config
just delete unwanted .config files in C:\Program Files (x86)\NuGet\Config
I had this same issue on an Azure Devops build machine, which was causing a build failure when it would build locally and on other build machines. Found this file here: C:\Program Files (x86)\NuGet\Config\nuget.config which contained the offending packages.
deleted the nuget.config file at that location and worked like a charm. Hope this helps someone.
How can I permanently remove this package source?
When we create Service Fabric application with Visual Studio, we always receive following message in the output window:
An error occurred attempting to configure NuGet to reference the
Service Fabric SDK package location as a package source. To fix this,
you can manually add a NuGet package source in the Options window and
setting it to the following path: C:\Program Files\Microsoft
SDKs\Service Fabric\packages.
You may configure nuget setting as suggestion.
So, to permanently remove this package source, you can open the visual Studio Tools->NuGet Package Manager->Package Manager settings->Package Source:
Select that nuget package source and delete it. Or you can open the configuration file nuget.config directly from path C:\Users\<UserName>\AppData\Roaming\NuGet\nuget.config and delete it:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
...
<add key="Test" value="C:\Program Files\Microsoft SDKs\Service Fabric\packages" />
</packageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
...
</configuration>
Move the package source <add key="Test" value="C:\Program Files\Microsoft SDKs\Service Fabric\packages" />.
Hope this helps.

ClickOnce Prerequisites: where is SQL Server Express 2014 LocalDB?

I am creating a clickonce installer for my wpf application from within Visual Studio 2013 Community edition. This application uses a localdb. It works fine on the target machines if I manually install sqlserver express 2014 LocalDB.
But I would like to include the installer for SQL Server Express 2014 LocalDB with my clickonce deployment.
When I open the prerequisites dialog, however, only SQL Server 2012 Express LocalDB is available (see image). I tried selecting '2012, but it is not compatible with the mdf file my installer drops into the data folder.
The question is: How do I include the SQL Server Express 2014 LocalDB installer as a prerequisite? Is there a way to just drop the MSI file somewhere and make it work? Or will it be easier to stick with '2012?
As I posted on the MSDN forums I created my own package as an official version doesn't exist. The package is basically just a copy of the SqlLocalDB2012 package updated to point to the new version of msi files to download.
I've put all the files for the boostrapper package on GitHub so people don't have to create the files themselves. There's two versions, one for the original release and one for the SP1 release. Following are the steps to create the original release version yourself:
Create a folder SqlLocalDB2014
Create an xml file in the folder called product.xml with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Microsoft.SqlServer.SqlLocalDB.12.0">
<InstallChecks>
<FileCheck
Property="sqllocaldbVersion"
FileName="sqlservr.exe"
SearchPath="Microsoft SQL Server\120\LocalDB\Binn"
SpecialFolder="ProgramFilesFolder"
/>
</InstallChecks>
<PackageFiles CopyAllPackageFiles="false">
<PackageFile
Name="x86\sqllocaldb.msi"
HomeSite="sqllocaldb_32"
PublicKey="3082010A0282010100E57C2F2D0CA9EC7AA834E04C3F7F490E0DB615AD1913DE528A26991571A962270737A5833082626C0BA3FD060D171406E6E0ADCC95960A205AA296E1E057303C5D629BC55D890CD034DFD9D8FA35EF11238BC0F9EB4AF439DA2F7110EB11B32C37A370E886173EEF2A46D08EC7B94800A137F1C7C8E7D21E6B4A2AF2C64C1D709F7CC368428E3CED811A52E33E32943D7E18F19BE44B5C11E4D6C3851E6C033073BCC9A8017D9DADD1F573F05B1A7B2F1F8B32BEB38EB53BD9F7FFF35FB3137C139357B8A05E359883A13434F2C5049FB9FE46170C91DFEF0F55F6ECCC39C96165A129EEBE11371BB76E4255C9CC35D152B303709C98349E2936A917195F0BBF0203010001"
/>
<PackageFile
Name="x64\sqllocaldb.msi"
HomeSite="sqllocaldb_64"
PublicKey="3082010A0282010100E57C2F2D0CA9EC7AA834E04C3F7F490E0DB615AD1913DE528A26991571A962270737A5833082626C0BA3FD060D171406E6E0ADCC95960A205AA296E1E057303C5D629BC55D890CD034DFD9D8FA35EF11238BC0F9EB4AF439DA2F7110EB11B32C37A370E886173EEF2A46D08EC7B94800A137F1C7C8E7D21E6B4A2AF2C64C1D709F7CC368428E3CED811A52E33E32943D7E18F19BE44B5C11E4D6C3851E6C033073BCC9A8017D9DADD1F573F05B1A7B2F1F8B32BEB38EB53BD9F7FFF35FB3137C139357B8A05E359883A13434F2C5049FB9FE46170C91DFEF0F55F6ECCC39C96165A129EEBE11371BB76E4255C9CC35D152B303709C98349E2936A917195F0BBF0203010001"
/>
</PackageFiles>
<Commands Reboot="Defer">
<Command PackageFile="x86\sqllocaldb.msi" Arguments="IACCEPTSQLLOCALDBLICENSETERMS=YES" EstimatedInstallSeconds="90">
<InstallConditions>
<FailIf Property="VersionNT" Compare="ValueNotExists" String="InvalidPlatformOS" />
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="6.0.1" String="InvalidPlatformOS" />
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" />
<BypassIf Property="sqllocaldbVersion" Compare="VersionGreaterThanOrEqualTo" Value="2014.120.2000.8" />
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="3010" Result="SuccessReboot" />
<DefaultExitCode Result="Fail" String="GeneralFailure" FormatMessageFromSystem="true" />
</ExitCodes>
</Command>
<Command PackageFile="x64\sqllocaldb.msi" Arguments="IACCEPTSQLLOCALDBLICENSETERMS=YES" EstimatedInstallSeconds="90">
<InstallConditions>
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="amd64" />
<BypassIf Property="sqllocaldbVersion" Compare="VersionGreaterThanOrEqualTo" Value="2014.120.2000.8" />
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="3010" Result="SuccessReboot" />
<DefaultExitCode Result="Fail" String="GeneralFailure" FormatMessageFromSystem="true" />
</ExitCodes>
</Command>
</Commands>
</Product>
Within the folder create another folder called en and create another xml file called package.xml
<?xml version="1.0" encoding="utf-8"?>
<Package Name="DisplayName" LicenseAgreement="Eula.txt" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
<PackageFiles>
<PackageFile Name="Eula.txt" />
</PackageFiles>
<Strings>
<String Name="Culture">en</String>
<String Name="DisplayName">SQL Server 2014 Express LocalDB</String>
<String Name="sqllocaldb_32">http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/LocalDB%2032BIT/SqlLocalDB.msi</String>
<String Name="sqllocaldb_64">http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/LocalDB%2064BIT/SqlLocalDB.msi</String>
<String Name="AdminRequired">You do not have the permissions required to install SQL Server 2014 Express LocalDB. Please contact your administrator.</String>
<String Name="GeneralFailure">An error occurred attempting to install SQL Server 2014 Express LocalDB.</String>
<String Name="InvalidPlatformOS">The current operating system version does not support SQL Server 2014 Express LocalDB.</String>
<String Name="InvalidPlatformOSServicePack">The current operating system does not meet Service Pack level requirements for SQL Server 2014 Express LocalDB. Install the most recent Service Pack from the Microsoft download center at http://www.microsoft.com/downloads before continuing setup.</String>
</Strings>
</Package>
Copy the C:\Program Files\Microsoft SQL Server\120\License Terms\License_SqlLocalDB_1033.txt file into the en folder and rename it to eula.txt.
To install the package copy the folder SqlLocalDB2014 to where your other bootstrapper packages are located e.g. C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages
You should now be able to use the package from Visual Studio, however if you wish to have the component installed from the same location as your application then you'll need to download the two sqllocaldb.msi files specified in the package.xml file and put them in x86 and x64 folders inside the SqlLocalDb2014 folder.
Lastly, this package is only for English but you may support multiple languages by adding folders for each language with package.xml and eula.txt files.
I'm having exactly the same problem as well. I found one potential answer at the MSDN forum and it seems to work for me.
To summarize the answer from the link: You have to create a "bootstrapper" for LocalDB 2014. This is just a folder in your "Microsoft SDKs directory" containing some specific xml files with keys/meta-data and an eula text file. The answer in the link provides the content for these xml files. After restarting visual studio, "Sql Express 2014 LocalDB" will appear along with all the other prerequisites and can be added to ClickOnce dependencies.
The solution for Localdb2017
Copy the SqlLocalDB2017 folder into the proper place e.g.: c:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages and restart Visual Studio.
Here is a simple and complete description on how to add SqlLocalDB 2014 ClickOnce Bootstraper in Visual Studio.
If you want to include sqllocalDB setup files you just got to download them from the links in the package.xml file. But it seems that the sqllocaldb_x64.msi is wrong and it does not install on x64 windows (tested on Windows 7 x64 sp1).

Proxy setting in visual studio 2013 config file

I was trying to add third party web service reference in my application, got proxy error. when I uncheck IE proxy setting then htttps service reference is getting added, but still could not run my application. I tried adding proxy setting in web config file but no luck. Could any one suggest me.
assuming you just call a web service
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy usesystemdefault="True" bypassonlocal="True"/>
</defaultProxy>
</system.net>
If you are having a WCF Client then set
BasicHttpBinding.ProxyAddres
Thanks. It works. I just tryied this and it works.
<system.net>
<settings>
<ipv6 enabled="true"/>
<servicePointManager expect100Continue="false"/>
</settings>
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy usesystemdefault="True" />
</defaultProxy>

IIS Express Visual Studio Integration - Changing site name

I'm just starting to use Visual Studio 2010 SP1 with IIS Express. When Visual Studio launches IIS Express, it specifies the name of the "site" to launch IIS Express with. The name of the site seems to be derived from the name of my web project. Is it possible to have Visual Studio launch a site with some other name? For instance, if my web project's name is "WebProject1", when Visual Studio launches IIS Express, it will use the following command:
iisexpress.exe /site:WebProject1
I would like to force it to do this instead:
iisexpress.exe /site:MyMasterSite
Any ideas out there?
You will want to change this in the applicationhost.config file. This can be found in the user/documents/iisexpress/config folder. In the config file, under the system.applicationhost node you will find a sites node that should allow you to set the name in the site name node.
<sites>
<site name="WebSite1" id="1" serverAutoStart="true">
<application path="/">
<virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":8080:localhost" />
</bindings>
</site>
<siteDefaults>
<logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
<traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
</siteDefaults>
<applicationDefaults applicationPool="Clr4IntegratedAppPool" />
<virtualDirectoryDefaults allowSubDirConfig="true" />
</sites>

Visual Studio Setup & Deployment: Adding Pre Requisits

How can I add into Setup & Deployment project that I want to the client has more components, like:
Microsoft Chart Controls
Microsoft SQL 2008 Express Edition (not 2005)
etc...
alt text http://img55.imageshack.us/img55/2586/200902021225eu9.png
This options are not in VS 2008, and in the window (image above) it only has a link to "Check Microsoft Update for more Redistributable components" but it goes to a page with 2 "bootstrapper packages" (I don't even know what's this)
any ideas on how to add this to the project instead asking the users to install this manually?
Thank you.
Have a look at the article
Authoring a Custom Bootstrapper Package for Visual Studio 2005
If you locate a folder
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages (VS 2005)
or, for VS 2008,
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages
Each folder under 'Packages' is the prerequisite you see in the list, as shown on your screenshot.
So, if you want to add an application called MyPrereq as a prerequisite, you need to make your own folder 'MyPrereq' under 'Packages'. Then you make a product.xml file similar to this
<?xml version="1.0" encoding="utf-8"?>
<Product ProductCode="MyPrereq" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
<PackageFiles CopyAllPackageFiles="false">
<PackageFile Name="MyPrereq.exe" />
</PackageFiles>
<InstallChecks>
</InstallChecks>
<Commands Reboot="None">
<Command PackageFile="MyPrereq.exe" EstimatedInstallSeconds="90">
<InstallConditions>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<DefaultExitCode Result="Fail" String="GeneralFailure" FormatMessageFromSystem="true" />
</ExitCodes>
</Command>
</Commands>
</Product>
and your package.xml file similar to this
<?xml version="1.0" encoding="utf-8"?>
<Package Name="MyPrereq" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
<Strings>
<String Name="Culture">en</String>
<String Name="DisplayName">MyPrereq</String>
<String Name="GeneralFailure">A fatal error occurred. The installation failed.</String>
</Strings>
</Package>
and place these files and your setup package (MyPrereq.exe) in the folder. Check the existing packages as an example to see where to place files.
If you do everything properly, you will be able to see your MyPrereq option in the list of "Choose which prerequisites to install".

Resources