Menu
  • HOME
  • TAGS

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...

Call Contentclick event elsewhere

c#,visual-studio

Since this is dependent on an event fired by the DataGridViewCell (in other words, some parts of the method depend on e), you cannot move as is. If you want to use elsewhere, you need to "wrap" it in a method that accepts the same arguments, then pass those arguments...

Binding warning when scrolling horizontally in datagrid

.net,wpf,visual-studio,binding,wpfdatagrid

The reason for your error is clear from its description: Value produced by BindingExpression is not valid for target property.; Value='-0.29487179487171' ... target element is 'Button'; ... target property is 'Width' Therefore, the value that is data bound to the Button.Width is -0.29487179487171, but obviously, a Width cannot be negative....

compile error when using boost::lockfree::spsc_queue (Is it a bug in boost?)

c++,visual-studio,boost

Yes that is a bug in 1.57 and has been fixed in 1.58

Should nDepend's output folder be added to source control?

visual-studio,code-analysis,ndepend

As you noticed you are quite free to decide. When you wrote: This means however that the generated NDepend XML and binary files are located along with my source code. ...maybe it means you haven't seen the possibility to customize both... historic analysis result + report storage root folder, and...

TFS Build - Get Assembly Version Info

visual-studio,tfs,build,msbuild

Without modifying the build process template? No. Even then, the build number is set prior to compilation (or, IIRC, even syncing the code from source control), so you're in for a wild ride trying to get the behavior you want.

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....

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,...

Get the path of the active document in Visual Studio

c#,visual-studio,visual-studio-2013,vspackage

So I solved my problem by this: DTE dtr = (DTE)GetService(typeof(DTE)); string filePath = dte.ActiveDocument.FullName; I also tried DTE2: EnvDTE80.DTE2.dte2; dte2 = (ENVDTE80.DTE2)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.12.0"); string filePath = dte2.ActivaDocument.FullName; NOTE: When using DTE I get the current document in the Main Visual Studio (when running the code, another Visual Studio will be...

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...

How Can I Add a Drop Downmenu, Selection, add that text in a richtextfield

visual-studio,visual-studio-2013

You use the SelectedIndexChanged event of the ComboBox(Drop Down Menu). Then try to add this code on the event function. C# private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { richTextBox1.Text = main_text + " " + comboBox1.Text; } VB Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged...

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...

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...

Implementing callback function for dialog-based application

c++,c,visual-studio,user-interface,winapi

So, I got it. The code created by the Visual Studio wizard indeed demonstrates correct implementation of the Windows API. Points to note: A dialog box procedure should not call DefWindowProc(). That's why the MessageBox is not working, as noted by Hans Passant in the comments. The purpose of the...

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...

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...

Unsure how to set C# Connection string depending on solution configuration

c#,mysql,visual-studio,connection-string

You're looking for config transforms, (msdn article: https://msdn.microsoft.com/en-us/library/vstudio/dd465318%28v=vs.100%29.aspx) However this will only work for web project. Using this in other projects will require custom code or, as I usually do, external packages, e.g. Slow Cheetah (https://www.nuget.org/packages/SlowCheetah/) that will allow you to use transforms in any config file. The syntax is...

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....

How to rename qrc file?

visual-studio,qt

There is need to edit Q_INIT_RESOURCE argument. int main(int argc, char *argv[]) { Q_INIT_RESOURCE(mdi); ...

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."

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....

SQL server & Visual Studio

sql,sql-server,visual-studio,visual-studio-2012

If you are running Visual Studio on your local machine, you have not any problem with firewalls and enabling of TCP/IP. try this four solutions may fix your problem: SQL Server Express LocalDB add-on, get it from this link. Make sure that your SQL service is running. use SQL Server...

Visual Studio loses first stack frames on StackOverflowException

c#,visual-studio,stack-overflow,html-agility-pack,stack-frame

There is no apparent feature as to restrict the stack size of the CLR application or increase Visual Studio's tracked stack frame count. As a solution I'll just give up on HtmlAgilityPack to extract the text (things like this aren't really solutions) and write myself an old fashioned HTML to...

Visual Studio: replace default doubleclick-event

c#,winforms,visual-studio,events,attributes

if you just add DefaultEvent attribute to your control class with another event name, it should work fine (rebuild projects before check after adding attribute) [DefaultEvent("KeyPress")] public class NumericControl : System.Windows.Forms.NumericUpDown ...

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...

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...

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...

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,...

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. ...

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 set a custom color for html angle brackets in VS 2013?

visual-studio

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...

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 ...

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(); ...

Remove Unused Namespaces from entire project/solution

visual-studio

Unfortunately Visual Studio does not offer this functionality. However there are extensions (other than Resharper) that do it, take a look for example at Productivity Power Tools (it's free).

Why can't I use the Windows.Phone.Media.Capture namespace?

c#,windows,visual-studio,windows-phone,windows-phone-8.1

AudioVideoCaptureDevice is available for use in Windows Phone Silverlight 8.1 Apps. You created Windows Phone 8.1 Store App which uses WinRT API. Your main two options are: Create new project and use Windows Phone Silverlight 8.1 Leave your project as it is but use MediaCapture class of Windows.Media.Capture namespace instead...

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; } ...

String tokenizing in Visual Studio C++

c++,visual-studio

strtok_s's context parameter stores data about the current state of the parsing. What it does and how it works, you don't really need to care, but if I remember correctly it's just a pointer to the first character after the last delimiter. All you need to do is provide a...

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.

Azure : HOWTO/BEST-Practice : Publish WebApp with Webjob using blobs Q's to multiple destinations?

visual-studio,azure,windows-azure-storage,publish

If i understand your question : set key in your App webconfig with dummy values <appSettings> <add key="BLOBAzure1" value="Check Azure" /> </appSettings> Get connection string for blob at runtime with something like this: CloudStorageAccount storageAccount = CloudStorageAccount.Parse( CloudConfigurationManager.GetSetting("BLOBAzure1")); Inside Azure Panel go to your Web app properties and set REAL...

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...

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" } } ...

VB.Net: Display total when check boxes are checked

vb.net,visual-studio,checkbox,include

Providing you have TextBox1 as your exp input and two check boxes which are CheckBox1 and CheckBox4 for system and hs respectively and a button to process the input then you can have this code below. Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...

.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....

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...

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' ">...

Substring a stringRaw from String1 to String2

vb.net,visual-studio,substring,visual-studio-2015

I was having issues going after the same characters so I went after text within the string such as "http" and "title=". Here it is in VB: Dim startIndex As Int32 = stringRaw.IndexOf("http") Dim endIndex As Int32 = stringRaw.IndexOf("title=") - 2 Return stringRaw.Substring(startIndex, endIndex - startIndex) I used "http" and...

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...

Debug java in brackets editor or Visual Studio Code

java,visual-studio,debugging,editor,brackets

You can compile Java using the command line, by navigating to the correct directory and using the javac command. I'm afraid you're probably out of luck when it comes to debuggers. The best you can do, to my knowledge, is to use prints to track your code.

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...

Visual Studio 2015 Ignoring New Folders & Files

asp.net,asp.net-mvc,visual-studio,visual-studio-2015

If the files are missing on a build server check the files are committed to your source control. If the folder is empty, its not clear in your question if it is or not, you can either add a dummy.txt file or follow the instructions listed here. How to force...

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...

SDL image disappears after 15 seconds

c++,visual-studio,sdl

Every time you call the shark function, it loads another copy of the texture. With that in a loop like you have it, you will run out of video memory quickly (unless you are calling SDL_DestroyTexture after every frame, which you have not indicated). At which point, you will no...

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.

Is it possible to read/retrieve a c++ source code from a .sln file?

c++,visual-studio,source,solution,sln-file

No, SLN files only store the project settings. You should send him the whole project in a compressed file. Just so you know, the recommended way to share code with other people is using a version control system, like GIT....

C# implementation of Dictionary to Create an index of words

c#,visual-studio,dictionary,indexing,text-processing

Try something like this: void Main() { var txt = "that i have not had not that place" .Split(" ".ToCharArray(),StringSplitOptions.RemoveEmptyEntries) .ToList(); var dict = new OrderedDictionary(); var output = new List<int>(); foreach (var element in txt.Select ((word,index) => new{word,index})) { if (dict.Contains(element.word)) { var count = (int)dict[element.word]; dict[element.word] = ++count;...

Cannot find InvalidCastException in C# Application

c#,winforms,visual-studio,visual-studio-2012,webforms

Direct casting from an object only works when that object inherits from the type you're casting to (somewhere along the line, anyways). A simple way to get the type you need out of a DataReader is to call [type].Parse(reader[index].ToString()) where [type] is what you want to cast to, i.e. ulong.Parse(rdr["startTime"].ToString())...

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 Task\s+(\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....

Visual Studio 2013 crashes when writing opening angle bracket

visual-studio,xaml,crash,intellisense,xamarin.forms

Problem solved by deleting the hidden file .suo in the projectdir. After a restart everything works fine! :)

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...

Get Latest Version using command-line from VSO?

visual-studio,tfs,visual-studio-online

You're right, you need to enable alternate credentials. You were looking in the wrong place to set it up, though. It looks like you were trying to use a service hook. Just follows steps 1 and 2 in the VSO OAuth documentation: Click on your user name, go to your...

How to change TextAlignment by code? LightSwitch 2013

javascript,visual-studio,visual-studio-2013,visual-studio-lightswitch

As far as i know the LightSwitch 2013 HTML contentItem.horizontalAlignment field is Read-Only. I don't know any LightSwitch methods that allow you to change this at run time. I'm sure it can be done in Javascript or JQuery. You could create 2x TextBox controls and set one to align left,...

How connect database created in SQL Server Management Studio with Visual Studio?

c#,visual-studio

Probably not the best way, but from Visual Studio: Open the Server Explorer panel Click "Connect to Database" From here, there are two options depending on whether the database above was created for SQL Server or as a SQL Express file. If the database came from a SQL Express .mdf...

Form close event in visual studio c#

c#,winforms,visual-studio

You can avoid the multiple prompts by checking to see if Application.Exit() has been called already from within the FormClosing event: void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason != CloseReason.ApplicationExitCall) { DialogResult dialog = MessageBox.Show("Are you sure you want to really exit ? ", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialog...

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() { } ...

C# Security Exception

c#,visual-studio,securityexception

It appears you are using a Unity library but trying to run it as a standalone application? This error means you are calling a method that is implemented within the Unity engine. You can only use the library from within Unity. If you want to use it standalone, you'll need...

Multiple socket connection

c#,visual-studio,sockets

Yes you can create multiple sockets in order to communicate with clients concurrently. See associated links for sample code. Whether or not your application will be a client or a server will depend on how the price checker expects to be communicated with. To make your life easier, focus on...

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"]);...

Elastic Bamboo CI Windows Server - MSBuild 12 not publishing

c#,visual-studio,visual-studio-2012,msbuild

I have managed to get this to work but I don't have a clean answer. I am guessing this is why there has not been any replies. MSBuild is a complex beast mostly because it references many paths outside of the project. In my instance MSBuild was looking for ReportViewer.WebForms...

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...

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...

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.

Is it possible to get code coverage data for integration tests using Visual Studio?

c#,visual-studio,selenium

Yes, you can do this using the Dynamic Code Coverage tools that ship with Visual Studio 2013. I'm using Premium, so I can't say for sure which versions may or may not have this component. The command to start coverage and hook it into IIS is as follows: <VisualStudioInstallDirectory>\Team Tools\Dynamic...

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...

How can I tell what will be updated if I use “Get Latest Version”?

visual-studio,visual-studio-2013,tfs,tfs2013,tfvc

Use Compare... and select Latest Version. That's best executed from the commandline or the Source Control Explorer. If you compare "Latest Version" (remote) with "Workspace version" (local), then it'll tell you what has changes on the server since the last get-latest. If you compare "Latest version (remote) with "Latest version"...

JS Code didn't work, trying do a demo in css lessons

javascript,jquery,css,visual-studio,vscode

Instead of using JQuery you can do it with CSS using :active #demoButton:active { transform: scale(0.2, 0.2); -webkit-transform: scale(0.2, 0.2); } Docs: http://www.w3schools.com/cssref/sel_active.asp...

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...

Visual Studio, Ripple Emulator and CORS/Cross Domain Ajax

visual-studio,cordova,hybrid-mobile-app,ripple

I got this problem sorted by downloading and installing a chrome extension, that sets the web security setting 'on' and 'off'. Link for the extension: https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?utm_source=chrome-app-launcher-info-dialog Visual studio seems to run a separate/second copy of Chrome. You have to install the extension in the Chrome instance that VS opens when...

visual studio cannot resolve static functions

c++,visual-studio,linker,singleton,static-functions

Your build output shows that you somehow managed to force the compiler to actually compile d3d9_object.h file. This is completely unacceptable. You are not supposed to compile header files. Header files are supposed to be included into .cpp files, not compiled by themselves. Because of that problem, your d3d9_object.h, after...

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="...

Directory of where Office solution has been placed

c#,visual-studio,excel-template

This depends upon how you're distributing your solution. Office add-ins and templates, when distributed through the standard ClickOnce mode, end up in a cryptically-named folder (inside another cryptically-named folder) that lives somewhere in AppData folder. You'll not be able to use the normal ways of getting the path of currently...

Can't add TemplateField to Datagrid

html,asp.net,visual-studio,drop-down-menu,datagrid

You should use TemplateColumn, when it comes to DataGrid as it is inherited from System.Web.UI.WebControls.DataGridColumn. TemplateField is inherited from System.Web.UI.WebControls.DataControlField, which make sense with GridView....

Visual studio extension resource files

c#,wpf,visual-studio,xaml,resourcedictionary

So like I was saying, always make sure you have your build action property set correctly on assets like images you're including in the build. In your case, setting it to Resource does the trick. Glad you got your remedy, cheers!...

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...

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...

Cannot install Visual Studio Professional and Community on Windows 8.1 Enterprise

visual-studio,windows-8.1

ok, according to the dump, the setup crashes because of the Intel HD graphic driver: EXCEPTION_RECORD: (.exr -1) ExceptionAddress: 00000000 ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 00000008 Parameter[1]: 00000000 Attempt to execute non-executable address 00000000 PROCESS_NAME: vs_professional.exe ERROR_CODE: (NTSTATUS) 0xc0000005 - Die Anweisung in 0x%08lx verweist auf...

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...

msbuild set path to CL

visual-studio,msbuild,clang

This is easy to do from either command line or project file. The properties you need to configure are $(CLToolExe) and $(CLToolPath). From the command line: msbuild MyProj.vcxproj /p:CLToolExe=clang-cl.exe /p:CLToolPath=c:\whatever\path\to\the\tool Alternatively, inside your .vcxproj file: <PropertyGroup> <CLToolExe>clang-cl.exe</CLToolExe> <CLToolPath>c:\whatever\path\to\the\tool</CLToolPath> </PropertyGroup> If you are calling task CL directly inside your .vcxproj file,...

Release Management for Visual Studio 2013 - Release Exception

visual-studio,tfs,msbuild,release-management,ms-release-management

Found the issue: Had two components in the release process -- Second component in the release process used a different build template than the first. First component deployed successfully, but second component had no builds in TFS yet, so BuildNumber was null....

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...

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...