I wish to make my installer (visual studio setup) to install redistributable (Visual C++ 2013 redistributable x86) in case it isn't installed on the PC or install the necessary dll for my program. I don't wish to set a launch condition.
If possible, I wish that the installation of the redistributable to be silent.
Sep 02, 2014 NSIS 제작시 vcredistx86.exe 숨기고 설치하기. Vcredistx86.exe silent install NSIS. Edit Bonus code: If you build vswhere, you can use it to extract the redistributable from your Visual C install directory: Section /o VCRedist.
Any suggestion ?
That's what the Prerequisites button is for in the setup project's Properties. You'll need to set a configuration (such as Release) before you see that button. That's where you add the VC++ runtimes. That will generate a setup.exe that users run - it will install any of those prerequisites and then install your MSI file.
To make it silent you'd need to get into the manifest file that describes the command used to install the runtime, and change it to a silent command. There used to be a tool called the Bootstrap Manifest Generator that would do that kind of thing, if you can still find it.
There's no support I know of for any of the following, but this is how the VS bootstrapper works, so mangle at your own risk :)
You could open the built setup.exe as a file with Visual Studio and examine the resources - under 41 there's a setupcfg that's the specicification for the prereqs. You'd need to export it, alter it and re-import it.
Alternatively, the template for the standard prereqs that this uses comes from the SDK in architecture-dependent locations such as Program Files (x86)Microsoft SDKsWindowsv8.1ABootstrapperPackagesvcredist_x86product.xml so if you go in that Xml file and find the correct VCRedistInstalled settings and command lines, make it silent, and it should propagate into the setup.exe when you do the build. This is unsafe because a) you've altered a file so that will now not be updated by any SDK updates b) The file doesn't match the one installed by the SDK and there may be installer repair issues and c) Every bootstrapper build will be affected.
Why a breakpoint jumps in my C++ code?
c++,visual-studio,visual-c++
VS behaves differently with C++ and C#. In the case of C++, the debugger will ignore lines that don't contain any actual code and will keep moving the breakpoint until it hits a line that does contain some code. A somewhat related behavior is that if you try to debug...
why my asp.net project look like references not resolved?
asp.net,visual-studio,visual-studio-2015
They aren't missing, they are just not used. If they were missing/unresolved, there would be a red squiggle. They are dimmed because you aren't using them. See this: http://csharp.2000things.com/2014/10/28/1213-visual-studio-2014-unused-using-statements-greyed-out/ Try this for the other issues: Run VS with /SafeMode switch (eliminates the extension issues and possible conflicts with VS) Uncomment...
How do I display an Icon on the Taskbar but not on the form itself?
vb.net,winforms,visual-studio
I have found a workaround. If you do Me.ShowIcon = False after the form is loaded, then it will display in the taskbar, but not on the program. One way to do this is to have a timer enabled/begin as soon as form load ends, and then on tick, do...
Is there an opposite to 'go to definition' in Visual Studio?
c#,visual-studio
Right click, find all References. Or use Ctrl+K+R UPDATE I know where the Ctrl+K+R vs Shift+F12 confusion stems from. For developers that set up their environment settings for C#, Visual Basic or JavaScript, Ctrl+K+R is the keyboard shortcut that shows up in context menus. Shift+F12 is the keyboard shortcut that...
Where to store an mp4 file in my project?
.net,vb.net,visual-studio,mp4
Try going Project>'Project Name' Properties>Resources>Add Resource>Add Existing File This should add the file into your resources folder. You can then access any file by going My.Resources.Name_Of_Resource...
How to uninstall a program using C#? [duplicate]
c#,visual-studio,visual-studio-2012,command-line,windows-installer
You've asked with a Windows Installer tag, so if we are talking about products installed from MSI files: Attempt 1 is incorrect because Windows Installer doesn't use the uninstallstring to uninstall products (change it and see if it makes a difference), and there are better ways. 2 uses WMI, and...
How to set a custom color for html angle brackets in VS 2013?
In Visual Studio 2013, angle brackets (< and >) are in the XML Delimiter category. This will apply to XML Syntax delimiters, including <, <?, <!, <!--, -->, ?>, <![, ]]>, > and [, ] Note that this will not change the C# files angle brackets. More info: Fonts and...
An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code
c#,asp.net,visual-studio
You can't parse those string representations of double values in the drop-down directly to int like that, hence the error. Internally, it's basically calling this, and it expects an integer: Int32.Parse('29.99', NumberStyles.Integer, CultureInfo.CurrentCulture); Convert the strings to double instead, then either use them like that or cast them to an...
Node.d.ts issues errors using typescript compiler, how do I fix?
node.js,visual-studio,typescript,jasmine,protractor
Typescript wants a semicolon after You are using an older version of TypeScript. Upgrade to TypeScript 1.4 or later....
Msbuild now to conditionally use one of two targets with same name
visual-studio,msbuild
Provide a wrapper target, that depends on both targets. The both will be called, but only the one matching the condition will actually do something. <Project> <Target Name='foo' DependsOnTargets='_fooDebug;_fooRelease'/> <Target Name='_fooDebug' Condition='$(Configuration)' 'Debug' '> <Message Text=' RUNNING FOO DEBUG TARGET ' /> </Target> <Target Name='_fooRelease' Condition='$(Configuration)' 'Release' '>...
Visual Studio code generation - Use uppercase type names
c#,visual-studio,code-generation,codegen
One option is for you to manually change the snippets you are interested in. In Visual Sutio (I'm using 2013 Community Edition) go to Tools -> Code Snippets Manager... (or hit Ctrl+K, Ctrl+B). You will get a dialog with all the snippets VS is using: Select snippet you want to...
Exception in async task gets intercepted in Visual Studio
c#,visual-studio,exception,asynchronous
Why does the debugger stop even though the exception is inside a try/catch? Technically, the code is throwing an exception that is not caught by any of your code on the current call stack. It's caught by the (compiler-generated) async state machine and placed on the returned task. Later,...
Emulate Devenv/Runexit under MSBuild
visual-studio,msbuild,build-automation
This is the most basic Target which runs a projects' output file: <Target Name='RunTarget'> <Exec Command='$(TargetPath)' /> </Target> For c++ unittests I use something like this; it's a property sheet so it's easy to add to any project without needing to manually modify it. It automatcially runs the output after...
Visual Studio 2013 closes
visual-studio,visual-studio-2013
Everything is ok with your Visual Studio. It is an expectable behaviour of your program. First, you need to understand that Visual Studio doesn't somehow affect the process of program execution after it has been compiled and run. It shouldn't 'pause the program' in the end of execution itself. So,...
C# SocketException was unhandled
c#,visual-studio,socketexception
Bingo.Look at this chunk of code: private void bStartServer_Click(object sender, EventArgs e) { // Called once when the thread starts Thread tcpServerRunThread = new Thread(new ThreadStart(TcpServerRun)); tcpServerRunThread.Start(); // Called again here TcpServerRun(); } The TCPServerRun() method is being called twice: once when your thread starts, and then again via the...
How To Install Extended WPF Toolkit?
c#,visual-studio
Right click inside the toolbox somewhere, and click 'Add Tab'. Right click on the new tab you created and click 'Choose Items...', from there you can browse to the DLL and add the controls.
Tab completion for array not shows after first selection
visual-studio,powershell,nuget,tabexpansion
you can use ValidateSet: function global:Add-Shape { param( [ValidateSet('Circle','Square','Triangle')] [string]$Shape, [ValidateSet('Brown','Red','Blue')] [string[]]$Colors ) Write-Host 'Shape Name:$Shape' foreach ($i in $Colors) { Write-Host 'Color Name:$i' } } ...
How to map Visual Studio shortcut keys in Github Atom
visual-studio,coffeescript,atom-editor
Open the Settings panel by pressing ctrl-, on windows cmd-, on mac and select the Keybindings tab. It will show you all the keybindings currently in use. You can also open the keybinding resolver using ctrl-. and press ctrl-k and see what keybinding it displays. To assign custom keybindings, go...
How to Customize Visual Studio Setup
c#,visual-studio,setup-project
You can use a Microsoft Setup project or WIX (easily integrate with Visual Studio). Both are free. •You can do almost all of your customization in setup project by adding custom actions. •WIX (window installer xml) is the better option. You can do a complete customization from wix but it...
finding file in root of wpf application
c#,xml,wpf,visual-studio,relative-path
First, ensure that the file is definitely copied into your output ./bin/ directory on compile: This worked perfectly for me in my WPF application: const string imagePath = @'pack://application:,/Test.txt'; StreamResourceInfo imageInfo = Application.GetResourceStream(new Uri(imagePath)); byte[] imageBytes = ReadFully(imageInfo.Stream); If you want to read it as binary (e.g. read an image...
Proget Server Up but Feed Inaccessible in Visual Studio
visual-studio,visual-studio-2013,nuget,proget
This was corrected by clearing the value in the ODataBaseUrl in Advanced Settings. Upon doing this, the API Endpoint URL changed to what it should be- a fully qualified URL rather than a strange string.
C# Referenced Namespace Hidden By Class Namespace
c#,visual-studio
Since Token2 is also a sub-namespace of Token1 you need to specify that you're looking for the 'root' namespace: var frameworkClass1 = new global::Token2.Token4.Token5.Class1(); You could also alias it with a using statement: using Token5 = global::Token2.Token4.Token5; And then just reference the alias: var frameworkClass1 = new Token5.Class1(); ...
VIsual Studio: Deleting SUO file causes vs2013 to hang?
visual-studio,visual-studio-2013,suo
Try to disable your network adapter. In some cases the issue comes from vs2013 trying to connect with your Microsoft username on load. I hope it address your issue....
nuget security - malware installed by nuget packages?
visual-studio,nuget
NuGet packages can run arbitrary powershell scripts at install or deinstall time. In addition, they add executable code (through dll they install) to your solution, that you will execute the next time you run it (after all, that's the point of installing a package, right?). So yes, installing NuGet packages...
Assembly Dependencies Change After Installation
.net,visual-studio,dependencies,installer,.net-assembly
Ok, figured it out. First, facepalm The assembly added via NuGet has a specific version dependency on Castle.Core 3.2.0. However, because that assembly can still work with Castle.Core 3.2.0-4.0.0, an assembly binding redirect got added to App.config that indicates to the assembly loader that any assemblies requiring a version in...
Visual Studio 2013 LINK : fatal error LNK1181: cannot open input file
c++,visual-studio,opencv,visual-c++,visual-studio-2013
Remove all references to the library. Somewhere that project is pointing at the path you give above and you need to remove that. Then add the library into the executable project. Right click->add->existing item, change the type to all files, then browse to the file location. ...
In Visual Studio 2013, what does this black arrow-shaped symbol in the breakpoint bar mean? [duplicate]
c#,visual-studio,visual-studio-2013,ide
That icon indicates that the line is a Find Result from the last time you did a 'Find In Files.'
Translate this float value into english
c++,visual-studio,floating-point
Yes, it is negative infinity. To be sure, you could test it against: float.isNegativeInfinity...
How to install postgres with NSIS with all parameters?
postgresql,installer,package,nsis
This is about right. Please do not use port 5432 for PostgreSQL. Pick a non-default port well outside that range, like 5599 or something. Change the port by modifying postgresql.conf and setting the port directive. You might find it useful to simply append include_dir = conf.d or similar in your...
Is NSIS 3.0b1 stable for production usage?
installation,installer,nsis
NSIS 3 is basically NSIS 2.46 merged with the Unicode fork + additional bugfixes. Most of the changes are in the compiler and not in the generated installers. Development is still active but don't expect a new release until after Win10 RTM......
Tiny stub of bogus code purely for the purpose of setting a breakpoint (that doesn't create a compiler warning)
c#,visual-studio
For debugging purposes, what I always do is use System.Diagnostics.Debugger.Break(). In practice, it's just like inserting a break point on a statement but is much easier to determine its function after the fact, and is maintained through source control between users and systems. It doesn't clutter your Breakpoints window. It...
C++ Why does this work
c++,visual-studio,visual-c++,switch-statement
Apparently you have leftover input including a newline, in the input buffer of cin. That happens when you use other input operations than getline. They generally don't consume everything in the input buffer. Instead of the extra getline you can use ignore, but better, do that at the place where...
how to display dates from two different tables?
c#,mysql,visual-studio,dataview
You are assigning Checklist date and Service date to the same Date property. This should work: public DateTime Date { get; set; } public DateTime ChecklistDate { get; set; } protected override void FillObject(DataRow dr) { if (dr['Date'] != DBNull.Value) Date = Convert.ToDateTime(dr['Date']); if (dr['ChecklistDate'] != DBNull.Value) ChecklistDate = Convert.ToDateTime(dr['ChecklistDate']);...
How do I make visual studio show exceptions that any method may throw?
c#,visual-studio
You can do this by adding an <exception> tag to the methods comment: /// <summary> /// Fooes this instance. /// </summary> /// <exception cref='ArgumentNullException'>Yay for exception</exception> public void Foo() { } ...
Linker error compiling DX10 program in Visual Studio 2015
visual-studio,visual-c++,linker,directx
Which version of the legacy DirectX SDK are you using? Static libraries* from different versions of the Visual C++ compiler are generally not compatible, so my guess is you are using a DirectX SDK that no longer supports VS 2005--I believe the February 2010 DXSDK was the last one that...
Include file in solution explorer without it being a build dependency
c#,visual-studio,msbuild,intellisense
Move the code generation to BeforeCompile instead of CoreCompileDependsOn. this will keep the generation of the files from tirggering the subsequent builds. <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'> <Target Name='BeforeCompile' DependsOnTargets='GenerateCode'> </Target> <Target Name='GenerateCode' Inputs='@(Sources)' Outputs='@(Sources->'generated%(Filename).cs')'> <!-- run executable that generates files --> </Target> </Project> If you include all of the generated...
.gitignore File Not Working With Bonobo
git,visual-studio,github,bonobo
If they are showing up as changed (and not added), they were already in the repository before you added the .gitignore file. So you need to remove them from the repo by either a) deleting them from your local box and committing, or b) using git rm --cached on them....
Can I pass VisualStudio Edition name through a compiler option?
c#,visual-studio,unit-testing,vs-unit-testing-framework,compiler-options
Open the csproj in a text editor and, after the last <PropertyGroup> add: <PropertyGroup Condition=' $(VisualStudioEdition.Contains('Ultimate')) '> <DefineConstants>$(DefineConstants);ULTIMATE</DefineConstants> </PropertyGroup> note that I've written the constant in all upper-case, so you'll have to change your code to: #if ULTIMATE If you want to future-proof yourself, as suggested by @Damian: <PropertyGroup Condition='...
Lightswitch HTML Client: How to re-render an item (re-execute postRender callback)
javascript,html,visual-studio,visual-studio-lightswitch
In order for this to work correctly, you'll need to configure a dataBind change handler in your table row's postRender routine. The dataBind change handler will monitor for any updates to the value of the field which determines the highlighting, and can be implemented in the following fashion: - myapp.BrowseCustomers.CustomerRow_postRender...
C++ Have a function repeat in the background
c++,visual-studio
Use std::thread with this function: #include <thread> void foo() { // your code } int main() { std::thread thread(foo); thread.join(); return 0; } ...
Trouble with LINQ query and XML elements
visual-studio,visual-studio-2013
I figured out my problem, I resolved my issues with the following code: Dim query = From st In States.Descendants('state') Let stateName = st.<name>.Value Let length = stateName.Length Order By length Descending Select stateName For Each item In query If item.Length > 10 Then output.Items.Add(item) End If Next ...
Use Sync Framework without Installation
c#,visual-studio,microsoft-sync-framework
You can just copy the files as Sync Fx still uses COM. If you dont want to manually install the Sync Fx separately, you can bootstrap it with your application installer.
How do I make program with c# to check to see if a word is a palindrome? [closed]
c#,visual-studio,cmd
A palindrome is a sequence of characters that is the same whether read forward or in in reverse. So to determine if a string is a palindrome, we can compare the string with its reverse, it is one. So how can you create a reverse of a string? If you...
Regex to find C# async methods with missing “Async” suffix?
c#,regex,visual-studio
Here with Regex: (?i)async.*(?<!async)( It looks for the keyword async and then at a '(' without ('?<!') async before it. Edit: Better version. Thx @Andrew Tasks+(w+(?<!Async))( This will give you the methods with small written asyncs at the and as well. Furthermore it allows to use find and replace....
Using Try/Catch block to set file path?
visual-studio,visual-studio-2013
Your inner Try/Catch block should be inside the FileNotFoundException catch. Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Dim sr As IO.StreamReader Dim age As Integer Dim path As String Try sr = IO.File.OpenText('Ages.txt') age = CInt(sr.ReadLine) txtOutput.Text = 'Age is ' & age Catch exc As IO.FileNotFoundException...
uint32_t variable is strange changing
c++,visual-studio,sdl,sdl-net
You're passing in request to the SDLNet_TCP_Recv function and telling that function that request points to a buffer of size MAXLEN. As request comes from casting away the constness from the buffer of an empty std::string this is clearly wrong. You want a vector std::vector<unsigned char> request; request.resize(MAXLEN); ... nrcv...
Visual Studio Ctrl + F search freezes when including a '(' character
visual-studio,visual-studio-2013
Do you have regular expression searches on? ( is a meta-character for regexes and, on its own, is an invalid regex. Visual Studio is waiting for enough input for a valid regex to search with....
Build/Publish Single Page of Visual Studio 2013 ASP.NET Web Site
c#,asp.net,visual-studio
Publishing a single page is not recommended. As far as I remember ... VS never supported this ... The risk of incompatible assemblies is very high. Updating the HTML only portion of a single page could work ... but again ... not recommended ... and is bad practice The reason...
How does installers check for java version
java,windows,installer
The way I'd check for the Java version is running a simple class with the following: class VersionChecker { public static void main(String[] args) { System.out.println(System.getProperty('java.version')); } } EDIT: The reason why is that java -version will give something like this: java version '1.8.0_45' Java(TM) SE Runtime Environment (build 1.8.0_45-b14)...