Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Microsoft Visual Studio





Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code.

Share tech news, updates, or what's on your mind.

Sign up to Post

How Do I find the string has an apostrophe, single quote in the string.
I have a function
 Public Function ReplaceSingleQuote(ByRef val As String)
        '//***This function replaces the single quote to double quote***\\
        If IsNothing(val) = False OrElse val <> String.Empty Then
            val = val.Replace("'", "''")
            val = val.TrimStart
        End If
        Return val
    End Function

Open in new window

But, the problem here is that if use for multiple times for the same string it inserts too many single quotes.
Is there any way it just detects an single apostrophe and then replaces it with '' for sql compatibility.
Managing Security & Risk at the Speed of Business
Managing Security & Risk at the Speed of Business

Gartner Research VP, Neil McDonald & AlgoSec CTO, Prof. Avishai Wool, discuss the business-driven approach to automated security policy management, its benefits and how to align security policy management with business processes to address today's security challenges.

I have by mistake deleted app.config file from Solution Explorer in Visual Studio 2010. How to get it back ?

Is it ok to install Visual Studio Code alongside Visual Studio Professional 2017?
I am installing it in an attempt to use the Microsoft Dynamics 365 Financials SDK.

I'm interested in using Visual Studio in the field of BIG data and artificial intelligence.

At the moment the latest version of Visual Studio is 2017.
When is the next version due out?
What spec machine is needed for it to run smoothly in terms of processor, RAM and diskspace (and anything else that is relevant).
I found that with the Express edition, I could not use the Streamwriter.  Is this expected?
Relatively new to SSRS, but have been doing a bunch of work modifying reports and have had no problem deploying them on one "Project".  Client asked me to create a new report in another project, but when I attempt to run the existing reports in that project I get an error message:

An Error occurred during local report processing.
An Error has occurred during report processing.
The execution failed for the shared dataset 'AdoptionReferrals'.
Cannot create a connection to the datasource 'Data source for shared dataset'.
A network-related or instance-Specific error occurred while establishing a connection to SQL Server....
error: 40 - Could not open a connection to SQL Server.

When I created a new report the wizard created a new Shared Data Source allowing me to select the appropriate SQL Server and database, and I was able to get my report working in design/preview mode.  But when I attempted to deploy the report, I received the error:

Cannot deploy the report because the shared data source '/path/subpath/Shared Date Source Name' that the report references does not exist on the report server.

and it provides a filename 'Adoption Incentives.rdl'

So how do I deploy the Shared datasource name to the report server?
I have been going through a fairly large tutorial on MVC with Entity Framework.  All the lessons contained within have been working fine as have other tutorials.  But the same problem has occurred once I try to change the data source from the VS2017 app_data mdf file to a connection to a local SQL instance.    The code fails, either cannot locate the server or that the database is in uses.

I do not have an SQL Server installed locally, and so I assume that the external to the VS environment server is SQLExpress.  I have tried from the package manager console Add-Migration SomeName  followed by Update-Database.  The Update-Database fails sometimes and the initial pull of a set of rows for the start of the application fails other times telling me that either the table isn't there or that it cannot be dropped etc.  A nightmare of problems created the moment I try to use a connection string in my web.config.

I will include the contents of the web.config here and hopefully someone will have some ideas as to how to fix this.

<?xml version="1.0" encoding="utf-8"?>
  For more information on how to configure your ASP.NET application, please visit
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, 

Open in new window

Hi All,

I'm using visual studio code and using the integrated terminal.
When I create a directory and then type "git init", my new directory gets initialized.
But when I type "ls" to list the contents, I get the following error
" 'ls' is not recognized as an internal or external command, operable program or batch file. "

Am I missing something?  Thanks!
I am creating a report that I want to be able to show late shipments.  All of the fields I am working with are datetime fields.  I want to be able to highlight, change the font color, or add a field that will show the user which items were late.  So if my ShipDate was greater than my PromiseDate I want it flagged some way.  Because these are currently datetime fields, I may get some showing flagged as being late when the shipdate was the same date as the promisedate because of the time field.  

I will then want to sum these fields up some how to come up with an on time percentage.

What is the easiest way for me to do this?  Is it easier to enter this in the sql query or do it in an expression under the field properties?

I'm using Visual Studio 2012
In MVC4, the templates Visual Studio used to scaffold views (List, Create, Edit, Delete, Details) were found in a directory and could be altered, named List.tt.t4. However in MVC5, that no longer seems to be the case. I've altered every occurrence of these templates I could find on C:, including the .cshtml files, but none of them seem to control the code that gets generated.

Every time i generate a view, I have to go through them individually and fix 20 things that Microsoft decided to put in all views, it gets really time consuming.

I'd like to do it globally for all projects, but i'll settle for overriding them on a project by project basis.

I am trying to add the Microsoft.AspNetCore.Cors Nuget package to my Visual Studio 2017 project. I am getting this error:
"Unable to resolve dependencies. System.Globalization.Calendars 4.0.1 is not compatible with NetStandard Library 1.6.1 constraint: System.Globalization.Calendars (>=4.3.0)".
The System.Globalization.Calendars package is installed. I've tried taking it out. When I do that and try to install Cors, it tells me it can't find a version of System.Globalization.Calendarsthat is compatible with NetStandard.Library 1.6.1. Any idea what I am missing? Thank you.
Has Powershell sent you back into the Stone Age?
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

I trying to do the multi language application on Windows 10, Visual Studio 2017. The working code I used before stop to work for some reason.
using System;
using System.Windows.Forms;
using System.Resources;
using System.Globalization;

namespace Language
    public partial class Form1 : Form
        ResourceManager res_man;    // declare Resource manager to access to specific cultureinfo
        CultureInfo cul;            //declare culture info
        string test_string;
        public Form1()

        private void Form1_Load(object sender, EventArgs e)
            res_man = new ResourceManager("Language.Resource.Res", typeof(Form1).Assembly);

        private void switch_language()
             cul = CultureInfo.CreateSpecificCulture("eng");        //create culture for English
             test_string = res_man.GetString("Test", cul);
            label1.Text = test_string;

I downloaded project from www.codeproject.com and it gives the same error:
System.Resources.MissingManifestResourceException: 'Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Language.Resource.Res.resources" was correctly embedded or linked into assembly "Language" at compile time, or that all the satellite assemblies required are loadable and fully signed.'

I have three tables. Customers and orders and Items.  Each one is hierarchically connected to another. I have databind all the controls and datagrid to binding source.

How to update all the tables by calling binding source.endedit
Using Nessus to scan for vulnerabilities.  It is reporting that Visual Studio C++ is not patched, although the KB has been applied.
The following Visual C++ Redistributable Package has not
been patched :

  Product           : Visual C++ 2010 SP1 Redistributable Package
  Installed version : 10.0.40219.1
  Fixed version     : 10.0.40219.325

After further investigation, the machine in question only has the x86 version installed (and the DLL's in SysWo64 are the correct version) but there is also a set of DLL's in the System32 folder that are the older version.  If x86 is installed, does anyone know why there are files in the System32 folder?
I am getting one problem after installing visual studio community  2017 .It is not showing "NEW WEBSITE"' in File menu while opening new menu. i tried with tools-> import and export settings-> reset settings-> General development settings. Though 'new website' option is not showing for creating website application. Also I tried Command tool resetting all still NEW WEBSITE. Attach you will find screen shot. Merry Christmas, Happy New year and Thanks in advance.
I have a code which works
    objShape = ppPrsn.Slides(1).Shapes.AddPicture("Selectel.png", False, True, 0, 0, 300, 500)

Open in new window

Need to change the path to bitmap image. As the image is extracted from database in vb.net
So,do not have a filepath.

I have a Visual Basic application housed in a folder.
I am trying to open this application in Visual Studio 2015 so I can examine the Visual Basic code but I cannot see any code when I try to open the exe file
any help appreciated
I'm wanting to set a background color in my report to turn red if one condition is like "DOM" and a second condition is either "USA" or "SEECERT".  I have tried to get the syntax correct and haven't figured it out.

=iif(Fields!item_id.Value) Like "%DOM%" AND (Fields!coo.Value <> "USA" OR Fields!coo.Value <> "SEECERT"), 'Red', 'No Color'

Using Visual Studio 2012
I'm following a tutorial in Pro ASP.NET MVC 5 page 170.  Under "Creating the Database", it says to go to Server Explorer > Choose Data Source, Select Microsoft SQL Server, Continue, enter server name (localdb)v11.0, Use Windows Authentication, Select or enter a database name: SportsStore.

When I test the connection I see the error: A network-related or instance-specific error...

I tried replacing (localdb)v11.0 with LocalDB but got the same error.

What else should I try?
I have some WPF XAML code that I need to merge;

<TextBox Style="{StaticResource textBxErr}" ...>
        <Style TargetType="{X:Type TextBox}">
            <Setter Property="IsEnabled" Value="True">

Open in new window

I need to move the Style="{StaticResource textBxErr}" down into the <Style TargetType=...> area. Visual Studio isn't happy I'm setting Style in two different places. I just don't know the syntax for how to do that.

Thank you!

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

HI have misplaced my visual studio 2005 installation cd. Is there anything I can do other than buy a new cd?

I'm looking into Visual Studio Community to get a start in Visual Studio programming (and to see if I like it). I believe I can create a standalone executable app in this free version. Am I correct?
My app will require database tables. Does Visual Studio come with a database server? What is the default in Visual Studio?
Do I need to obtain a separate data server like MySQL or MariaDB or something?
We want to start building our own chromium browser for use in our Digital signage solution.

We have set up an environment on a Windows PC, and have successfully build a default chromium browser.

We do, however have some trouble finding our way around in the code.

Therefor, maybe som waypoints could help us.

Can anyone tell me, where I could find some code regarding:
The address bar
Forward/backwards arrows

A code snippet is enough, or maybe even better in which  files are they.

Also, hints on how to find elements, without having to guess our way through and making searches in Visual Studio, without knowing the name of what we're actually looking for

I have several ComboBoxes in my program, and the ones that have text already in the box end up highlighted.  This is true even looking at the form in Visual Studio (see attached).  Is there a way to keep the text from being highlighted?  The text in these boxes are highlighted when the program is launched.
In the Visual Studio 2017 Community edition - is there a way to control where tabs open?

I have 2 screens that I use while developing.

When debugging I like to have all source code window tabs on the extended monitor where I have it oriented vertically so I can scroll and see more code at a time.

On the laptop, I like to put all the other window tabs, like:

Watch windows
Find / Find results
Solution explorer
Call Stack
Toolbox (during design time)

Is there a way to have more control over this?  Like when windows get closed, the open again in the wrong place or floating.  I want to be able to say "this window always opens up over here" or in a group with other window tabs that I specify.

I am open to free third party tools that help wrangle the various windows at development or runtime / debugging.

Thank you for your help.

What has to be changed to make this work in a razer .net view.

<!DOCTYPE html>

  <script data-require="jquery@*" data-semver="3.1.1" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script data-require="datatables@*" data-semver="1.10.12" src="//cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
  <script src="dataTables.rowReorder.js"></script>
  <link data-require="datatables@*" data-semver="1.10.12" rel="stylesheet" href="//cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css" />
  <link rel="stylesheet" href="//cdn.datatables.net/rowreorder/1.2.0/css/rowReorder.dataTables.min.css" />
  <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

      line-height: 45px;
    background-color: #fff;
    padding-left: 10px;
    border-bottom: 1px solid;
    border-top: 1px solid #e5e5e5;}

  <table id="example" class="display" width="100%" cellspacing="0">

  <table id="newRow" style="display:none">
          <select id="selectbasic" name="selectbasic" class="form-control">
            <option value="1">option 1</option>
            <option value="2">option 2</option>

Open in new window


Microsoft Visual Studio





Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code.