Microsoft Visual Studio

898

Solutions

878

Contributors

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

I have a visual studio 2015 website and every time I run it, it recompiles, even if I haven't made any changes, which is making it tediously slow to get any work done.


On Website Property Pages:
Before running startup page:
Build Web Site

Build Solution action:
X - Build website as part of solution.

But I've had these settings for years and this hasn't been a problem in the past. I want to make sure all changes get compiled before testing.

Suggestions on best settings to keep it moving along, but yet compile changes?

thanks!
0
Microsoft Azure 2017
LVL 13
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Need a simple Visual Studio jQuery test environment.

I expect to be working in Visual Studio on a project which will involve Angular, Kendo UI and jQuery. So I need to set up a simple Visual Studio test environment where I can play around with some of the more complex jQuery commands.

What is the best way to do this in Visual Studio? I feel like I need a solution with an HTML file and a folder that contains jQuery. But feel free to suggest a few steps that can get me to that point.

And please include the steps to get jQuery installed. I assume that is just a NuGet call. But what about other dependencies?


Thanks.
0
I have a new server that has sql 2017, ssrs 2017 installed and ssdt installed.  I think i goofed something up.  When using ssdt with Visual Studio,  there are no projects available to start for Reporting Services.  I have a feeling i goofed up on the the install.
any suggestions.
screenshot.JPG
0
We have a new website and one of the pages when opened in a browser is like a form, and the boxes are not lined up correctly and the page is dark.
Is there a program that I could open up the page and edit it, such as lining up the boxes and making the page brighter? We have Visual Studio 2015 and when I open the page up in design view, I can align the boxes but when I save it, it doesn't keep the changes.
Thanks.
0
What settings to override on fresh install of SQL Server 2016?

I am installing this BEFORE I install Visual Studio Professional 2017 so that the Visual Studio installer will not try and install SQL Server for me. But I want to be sure I install SQL Server exactly correctly.

What questions will the installer ask me which might require me to change the default settings?

I would like to be armed with all the answers before I start the installation. My worry is that I may need to make an error and then need to uninstall SQL Server, which is not a good place to be.

Thanks
0
I need to install Visual Studio Professional 2017 but want to be sure I get the settings correct. I have had bac luck in the past letting Visual Studio install my instance of SQL Server, and found it better to FIRST install SQL Server, THEN install Visual Studio.

So, my questions are where can I get the URL's for

Visual Studio Professional 2017
SQL Server 2016

I plan to install them and use them for free until I get license keys in the next few weeks.

Thanks
0
What version of Visual Studio Community Edition?

I have 2015 but need to upgrade. I want to start testing some newer features of the .NET Framework, and perhaps play around with .NET Core as well as to use the .NET Standard 2.0.

What is the right version for me to install?

Can I leave Visual Studio Community Edition 2015 installed?

What about SQL Server? I have found if SQL Server is already installed, the Visual Studio installer will not try and install it. And I found that the Visual Studio installer does not do a great job of installing SQL Server.

I see I have SQL Server 2008 and 2014 installed.

Shall I install an updated version of SQL Server, then install the Visual Studio Community Edition?

If so, what versions of each do I install?

Thanks
0
Hello,
Find the third character in the string and check whether it is - (hyphen)

I am using vb.net desktop.
Thanks
0
I'm using Visual Studio 2017 with C#.
I want a user to input some letters into a textbox.  A model maps each letter to a number and returns the total.  how can I display the result (Total variable in the model) in a text area in the same view?

Home Controller
public ActionResult Cards()
        {
            return View();
        }
        public ActionResult Cards(CardModel C)
        {
            C.GetScore(C.Deck);
            return View();
        }

Open in new window


Cards View
@{
    ViewBag.Title = "Cards";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>

<h2>Cards</h2>

    <h2>Please enter a number</h2>

      First name: <input type="text" name="Deck"><br>
      <textarea id="TextArea1" rows="2" cols="20"></textarea>
    <input type="submit" value="Submit">

Open in new window


Model
 public class CardModel
    {
        public string Deck { get; set; }
        public int GetScore(string s)
        {
            int score = 0;
            int totalScore = 0;
            string individualCard = "";
            //loop through each letter in string and convert to a number.
           return Total
}
}

Open in new window

1
I'm using C# in Visual Studio 2017.  I came across this page outlining the performance of different data structures.
http://bigocheatsheet.com/#data-structures
Is there an article giving use cases for each structure?  At the moment I'm just interested in common structures like arrays, lists, dictionaries, stacks and queues.
Apart from inserting, updating, deleting and viewing records, what criteria are used when evaluating different data structures for a given project?

I saw this online which partially answers my question.  If space is not an issue when would I use a list as opposed to a dictionary?
When should I use something non standard like binary trees?

The SortedDictionary<TKey, TValue> generic class is a binary search tree with O(log n) retrieval, where n is the number of elements in the dictionary. In this respect, it is similar to the SortedList<TKey, TValue> generic class. The two classes have similar object models, and both have O(log n) retrieval. Where the two classes differ is in memory use and speed of insertion and removal:

SortedList<TKey, TValue> uses less memory than  SortedDictionary<TKey, TValue>.

SortedDictionary<TKey, TValue> has faster insertion and removal operations for unsorted data: O(log n) as opposed to O(n) for  SortedList<TKey, TValue>.

If the list is populated all at once from sorted data,  SortedList<TKey, TValue> is faster than SortedDictionary<TKey, TValue>.
0
Price Your IT Services for Profit
Price Your IT Services for Profit

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.

Hello

How can i pass an argument to a visual studio .exe (C++ project) from the command line i.e. cygwin?

Please note that I do not want to pass the argument via the Visual Studio GUI under debugger->Command Arguments.

So I would like something like this:
cygwin>a.exe 4

thanks
0
Directory.Exists(C# DotNet) returns true, but actually, the path is not existing in explorer windows. However, when I type in the unc or change directory using DOS command the directory appears.  Although "Directory.Exists" find the directory, it does not copy the directory. It only copies folders and files shown in explorer. I assume these folders\files were deleted but somehow is being seen by "Directory.Exists". How can I get "Directory.Exists" to ignore these folders\files? Also, if these are not deleted files, please explain why they are not shown in explorer. If they are deleted files that still exist on my computer, will they cause performance issues with the filesystem? Could this cause a directory search to take longer?
0
Compare a List with an Array (in .NET)

Please list the pros and cons of each.

Thanks
0
I have created a Integration Services app in Visual Studio 2013 that runs on SQL Server under the Integration Services Catalogs.

Its package reads some data with a stored procedure and writes out a flat file - txt.

In order to have access to the server and folder where that output file will go, in the Control Flow section I have added an "Execute Process Task" control.
These are the entries I have for the "Process" for that control:

Executable =  C:\Windows\System32\cmd.exe

Arguments = /C NET USE \\MyServerName\Shared\Download MyPassword /USER:MyUser /PERSISTENT:NO

WorkingDirectory = C:\Windows\System32

I have this package Deployed on the Development server and I can right-click on the package and it runs fine.

However, when I Deploy it to the Production server and then right-click to execute it, I get this error:

In Excecuting "C:\Windows\System32\cmd.exe" "/C NET USE\\MyServerName\Shared\Download MyPassword /USER:MyUser/PERSISTENT:NO" at "C:\Windows\System32", The process exit code was "2" while the expected was "0"

I believe Error Code 2 = The system cannot find the file specified.  I have checked on the Production Server and indeed there is a cmd.exe at location "C:\Windows\System32".

Any ideas what could be different on the Production server that would cause this error?

Thanks,
0
I'm trying to start a new visual studio 2017 C# project and have selected it to be an MVC project with the web API checkbox checked.  I've also checked the add unit test checkbox and changed the authentication to single user.  After I click OK I'm getting this message.

the specified path file name or both are too long. the fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.  The fully qualified file name is D:\OneDrive\Documents\Courses\QAASPNETMVC\Labs\04  DataStorage\01 Setup Projects\Begin\QAForumSolution which is 103 characters.
Why am I getting this message?
0
How do you create a sidebar menu in visual studio blend? I am wanting to create a tool that slides out on my windows screen that is specific to the tools I use to do my job. I want to be able to customize this for my use and share with other members of my team. Something similar to windows Sidebar tool but with slide outs, etc.. I am using windows 7 professional and we also have Windows 10 Os.
0
I am having problems with an old Visual Studio 2010 Webforms site that uses forms authentication and works well when published to production server.  The problem is now I have moved up to Visual Studio 2017 and having an issue of casting WindowsIndentity object to another custom class.  It used to work in 2010 but does not work in 2017 when debugging.  Tried to change the code and now the problem is that when starting to debug the site, some browsers are not prompting for a login and using NTLM and I need it to force forms authentication.  I have it set to forms in the web.config file.  Some day we will rewrite the site but stuck with old system for now.  

Why would something that worked in VS 2010 not work the same in VS 2017?   Site is ASP.NET 4.0.


Thanks
Patrick
0
When I try to compile my VB.net project I get error messages telling me that the access path is denied(See the error message at the bottom of this post).  To temporarily fix this, I run the following command:
icacls "c:\MyProjDir" grant Everyone:(OI)(CI)F /T

It works, and I am then able to compile my code with no errors. The problem is that I have to run this icalcs command  every time I build my code, otherwise I get the access to path error message again. So how can I get around having to repeatedly run the icacls command in order to compile my code?



c:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.target(4168,5): error MSB3012:
Unable to copy file "app.config" to "..\Debug\trx.dll.config". Access to the path "..\Debug\trx.dll.config"
is denied.
0
In Excel VBA I will "Add" modules to my code.  Within my modules I'll create subs and functions.  All of this in an effort to manage my code.

I don't ever add classes as I'm not sure what they are.

If I'm using c# in Visual Studio, how do I accomplish the same thing?  Code management...

Thanks
0
Cyber security certifications or degree?
Cyber security certifications or degree?

Cyber security is in demand—big-time. So what do you need to build a career in this lucrative field? Is a degree a must-have, or are industry-leading certifications more sought-after? Is it possible to break into cybersecurity without a bachelor’s or master’s degree in the field?

How do I call an instance of this class using C# in Visual Studio 2017?  At the moment I have a console App.  In the static main method I have this code, but can't invoke the Inventory class due to its protection level.

static void Main(string[] args)
        {
            Inventory I1 = new Inventory();
        }

Open in new window


I've seen a similar question here, but I want to understand what's happening rather than just copy and paste https://www.experts-exchange.com/questions/21783726/Singleton-example.html
I'd like to see the class invoked successfully once then produce an error message when I try to invoke it a second time.

    private static readonly Lazy<Inventory> instance = new Lazy<Inventory>(() => new Inventory());
    private Inventory()
    { }
    public static Inventory Instance
    {
        get { return instance.Value; }
    }
    public void LookupProduct(string upc)
    {

    }

Open in new window

0
I am creating a webAPI which returns 2 columns to a  list as 1 row When I test with powermon or
via html I only return [{}] . I know I have captured the data because I see the row in visual studio.

For some reason when I return to the controller the data that is in the model packet
for return from controller the data is missing returning only see  [{}]

Can anyone offer a solution or suggestions.

I'm under the gun.

Isaac

// Controller

using PicOfDay;
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using PicOfDay.Models;
using Newtonsoft.Json;
using System.Data;

namespace PicOfDay.Controllers
    
{
    public class PicOfDayController : ApiController
    {
        [Route("api/PicOfDay/pic_of_day/{id}")]
        [HttpGet]
        public IHttpActionResult pic_of_day(string id)
        {
             

            try
            {

                List<PictureOfDay> PicDateCaption = new List<PictureOfDay>();
                var picofday = new PictureOfDay();

                picofday.pic_of_day(PicDateCaption, id);

                return Ok(PicDateCaption);

            }
            catch (Exception ex)
            {
                return InternalServerError(ex);
            }
        }
    }
}

//=========================================

//Model

///=========================================

using System;
using System.Collections.Generic;

Open in new window

0
I just started using Visual Code Studio. A co-worker and I are working on a project together in which he will work on certain sections of the code and I will work on others.

We want to be able to "check out" a section of code, work on it locally and then post it up to be merged into the master code (upon approval).

I have seen ways to do what using github command lines. But is there a way to do that directly from Visual Code Studio?

What I'm looking for is this type of flow:

  • Start with the master code.
  • Each of us brings down files to our local machine to work on.
  • Our locally changed files are then staged to be uploaded.
  • The changes are reviewed and agreed upon.
  • The master branch is updated.

What I am looking for is a set of simple instructions for how this type of "checkout" procedure can be most easily accomplished and ideally from within Visual Code Studio itself.

Thanks.
0
Problem with visual 6 C++ code converting to visual studio 2010 c++. The following is the only code that errors out. The rest of the lib converts and compiles fine if I remark out this one line of code.
      WCHAR *printable = new WCHAR[(dwBufferSize+1)*2];
      printable[0] = '\0';

      for (unsigned long i =0;i<dwBufferSize;i++)
      {
         WCHAR scratch[3];
		 wsprintf(scratch,L"%02X", pBuffer[i]);   //This is the problem code. wsprintf requires LPSTR but scratch is WCHAR
         wcscat(printable, scratch);
      }

      *pbstrEncrypted = SysAllocStringLen(printable, dwBufferSize*2);

I've looked for code on the internet to convert a variable from WCHAR to LPSTR and back again. I could make do with that.  As near as I can see the wsprintf with the format 
code %02X takes a single wide char and makes it two hex output characters and concatenates it to the printable variable. This code was written in 2000.

Bob


      delete [] printable;

Open in new window

0
Hi

In Visual Studio 2017 Professional how do you uninstall the Xamarin components?

Thanks
0
Hi

I have an ASP.net web app which I have built in Visual Studio 2017 Professional. I just bought a new computer
and loaded the software on there. For some reason Visual Studio runs really slowly, especially in debug mode.
What might be causing this?
0

Microsoft Visual Studio

898

Solutions

878

Contributors

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.