Quantcast
Channel: Visual Studio General Questions forum
Viewing all 21115 articles
Browse latest View live

Generic classes templates with COM Interfaces

$
0
0

Hi 

this is my generic class with templates when I try to query using QueryInterface 

here the spDispatch is always NULL this doesn't work in VS2017 with windows server 2016 please help in resolving this , tlb is compiled with MIDL in VS2017 no difference

though this works fine with VS2015 and windows server 2012 

 CComPtr<IDispatch> spDispatch;
m_obj->QueryInterface (IID_IDispatch, (void**)&spDispatch); // here spDispatch is always NULL

CLASS 

template<class T0, class... T>
struct GetFirstParameterPackType { typedef T0 Value; };

template<class... Interfaces>
class ScriptHostObjectBase : public Interfaces..., public CComObjectRootEx<CComMultiThreadModelNoCS>
{
private:
    typedef ScriptHostObjectBase<Interfaces...> Self;
    typedef std::function<IDispatch* (Self*)> InterfaceCastFunc;
    typedef typename GetFirstParameterPackType<Interfaces...>::Value FirstInterface;
    static const int InterfaceCount = sizeof...(Interfaces);
    static const GUID InterfaceGuids[InterfaceCount];
    static const InterfaceCastFunc CastFuncs[InterfaceCount];
    static ITypeInfo* TypeInfoCache[InterfaceCount];

    struct Entry
    {
        UINT interfaceIdx;
        DISPID dispid;
    };

    const DISPID BaseVirtualDispID = 0x40000000;
    const DISPID MaxVirtualDispID = 0x50000000;
    std::vector<Entry> m_vecDispIDs;


BEGIN_COM_MAP(ScriptHostObjectBase)
        COM_INTERFACE_ENTRY2(IDispatch, FirstInterface)
    END_COM_MAP()
;;;;;;
}


VSProject.References.Add method is not working properly in netcore project

$
0
0

Hi All,

Currently I am trying to add the assembly references in netcoreapp project by using the below method. The below function working properly when we add the single assembly in the project. But I have faced the problem when I have tried to add the two or more assemblies one by one and this method is confused to add the next assemblies and my status bar message also not given the right content. I think the netcoreapp project has been tried to load after I have added the first assembly. 

foreach (string assembly in _assemblies)
                    {
                        try
                        {
                            string assemblyName = assembly.Contains("\\") ? Path.GetFileName(assembly) : assembly.Split(',')[0];
                            string projectname = Project.Name;
                            if (!ExistingReferences.Contains(assemblyName.ToLower()))
                            {
                                dte.StatusBar.Text = "VS Extensions: " + projectname + ", " + "Adding " + assemblyName + " assembly to the project reference...";
                                vsProject.References.Add(assembly);
                            }
                        }
                        catch (Exception e)
                        {

                        }
                    }

Could you please suggest me how can i resolve this issue? Also, is there any easy way to add the assembly reference in netcoreapp project by pro-grammatically ?

Thanks,

Ganesan R.

Querying TFS Server incidents

$
0
0
I have been asked to look into is creating a Heat Map report in Power BI for managers to bring up and see all the tasks their staff is working on and the status (on schedule, approaching deadline, critical, etc.). For the data sources, I am exploring the TFS databases. In the TFS database, which view or views would one be able to use to track work items? I looked at the TFS data warehouse database and checked the ipmTfsIncidentsV and ipmTfsPriorityIncidentsV views. I would need retrieve work items (such as Requirement, Change Request, Bug, etc.) as well as child tasks of this work item (work item type is “task”). Also, looking at the ipmTfsIncidentsV view I can retrieve work items (such as Requirement, Change Request, Bug, etc.) as well as child tasks of this work item (work item type is “task”). However, I do not see a column that identifies the parent of the task. For example, if the task with ID of 333 has a child with the task of 338 how would I be able to find the connection? I do not see any child or parent columns in these incidents views.

Powershell tf build checkin error

$
0
0

I’m adding a PowerShell task into the build definition.

The PowerShell task with type File Path.

I’m consistently getting the error TF30063: You are not authorized to access server path\collection if I am running with the build definition.

The same script I’m able to execute successfully without error by using the power shell script tool.

CD $WorkingDirectory  

$CheckInComment="***NO_CI***"

& $tfexe checkin $WorkingDirectory /comment:$CheckInComment /bypass /noprompt /override:$CheckInComment /recursive /force /login:"username","password"

license trail extension

$
0
0
I paid for my copy of Visual Studio 2017.  Why does my account show license trail extension(for evaluation purposes only)?

Re-engineering of existing web C# application

$
0
0

Hello,

Please, in order to provide myself further development of an existing WEB C# application developed in Visual Studio, upon having it in running, and specifically looking into e.g., default.aspx file/page, down left there are three buttons i.e., source/split/design.

Question: having clicked on Design, I have expected to see all the controls on a page and make analysis of it and add some additional functionality via certain controls. Problem is that in Design view there is nothing to see except huge rectangle...

Please, what do I miss?

XDesProc.exe issues (multiple process with high memory consumption)

$
0
0

Hello,

Why do I have multiple XDesProc.exe? It happens all the time, I need to kill them from task menager, because they consume HUGE amounts of memory. 

More info:

1. 1 instance of VS 2017, WPF project

2. Happens multiple times/8 hours of work

3. Up to 3 instances of XDesProc.exe

4. Doesn't release itself (never), I always have to kill it manually.

5. Started to happen Dec 2018/Jan 2019

And how do I fix this? 

VS Web Setup Projects for .NET Core Applications

$
0
0
I need to create an msi to install a ASP.NET Core Application in IIS.  In the past I have used web setup projects to perform this for standared .NET applications.   After creating one for .NET core the files are not being deployed to the IIS virtual folders.   Is it possible to create a web setup project for a .NET core application?  Is so are there any tricks or additional steps that need to be performed for .NET core applications.

Publish asp.net web application having VB.NET as code behind to Ubuntu Linux 16.04

$
0
0

Hello Experts !!

I am not sure if this question is relevant to this group, however still looking for an answer as I am a newbie and stuck in deploying my asp.net web application using vb.net in code behind to Ubuntu Linux 16.04.

I have searched a lot on web and every search result corresponds to the development and deployment of an asp.net c# web application developed using asp.net core.

However, I have an asp.net web application which has VB.NET in code behind and trying to publish this project to Ubuntu Linux 16.04.

Is there any way or procedure to do this ? Looking for an expert's advise.

resize array of records? Or is there a better solution?

$
0
0

I need to read a list of records from a text file. Each record is a person, with regular fields of ID, name, email'phone.

A list is probably not a good solution, since the order should be maintained.

So I was thinking of an array, but I have no idea how many records are there.

What is the recommended practice? 

To read one record at a time and resize the array accordingly?

Thanks 

Yigal

Creating a new blank windows form issues

$
0
0

When trying to add a new blank windows form to an in works project it is instead creating a windows forms with what seems to be an image of an existing windows form that exists in that same project. It will copy over its buttons, text boxes, labels, etc. The tools can't be interacted with either. When clicking on each specific tool an image of a lock appears in the upper left of the tool image. 

Edit: This is in C#.


How to acquire VS 2010

$
0
0
I have a program that I believe requires VS2010.  I have a team of 10 developers.  Can I purchase a stand alone VS license and get VS2010 or do I have to purchase 10 VS Subscriptions (the thing formerly known as an MSDN account)?

VS 2019 RC Fails to build with .net core 3.0

$
0
0
The previous 2019 versions have been working fine for me so I installed the release candidate. It will no longer load my .net core 3.0 projects.  It says:
"C:\Program Files\dotnet\sdk\2.2.200\Sdks\Microsoft.NET.Sdk.WindowsDesktop\Sdk not found. Check that a recent enough .NET Core SDK is installed and/or increase the version specified in global.json."

I installed .net core 2.2 yesterday for another unrelated project. So I don't know if it is the installation of that or the installation of the release candidate that is causing the problem. But the versioning mess of .net core is causing me enormous problems.

What can I do to get the release candidate to load the .net core 3.0 project again? I have repaired the preview install in case that was a problem.

As a further test I've tried creating a new WPF app (.net core). It displays the message "no template could be found with the group identity 'Microsoft.Common.WPF'. And won't let me go any further

Stefan

Visual Studio Commnity 2017 - Terms of Use

$
0
0

Hi All,

I have downloaded Visual Studio Community 2017, As It's free and I have gone through it's terms and conditions.I am single developer and no organization/no enterprise wants to use as a single developer.I want to make a website socially and get adds through Google Adsense. Can I use this Visual Studio Community for this case. Can you please confirm. Thank you Guys.

How can I create a custom nuget folder in VStudio?

$
0
0

Hi

I would like to create a custom folder structure and save only the nuggets libraries. I would like to enabled nuget to avoid downloading to Internet automatically

The structure:

RRHH

    folder 1: file1.dll

    folder 2: file2.dll


VS 2019 shift+f7 not working

$
0
0
In visual studio 2019, Shift+F7 and F7 are no longer working to move between xaml design view and C# code. I've reported this through the report a problem app and absolutely nothing happened. It's very difficult to use visual studio 2019 with this problem. Anyone have any fixes or can raise this higher in the priority queue? Should definitely be fixed for release. (This is with .net core WPF projects haven't tried it with .net framework)

A Little Help Please!

$
0
0

Hi,

I am wondering what does this symbol mean. It's a Person silhouette in front of a screen. Can anyone tell me what that is?

Also, wondering how does one create a child form I guess you can call it then make it into a parent form? I can't seem to figure it out or wrap my head around how they did that. Any help would be really appreciated.




Unable to Debug Windows Store App

$
0
0

I am receiving this error when I try to run a Universal Windows App using the local machine button. 

Unable to debug Windows Store app 'c:\[folder]\bin\x86\Debug\App1.exe'.

Access is denied.

This started to occur two days ago with the app I was working on. I have also tried to run a new project/app (blank) and get the same error. I have attempted the following to no effect:

  1. Make sure setting > Update & Security is set to Developer
  2. Make sure I have full rights to the folder specified in the error message.
  3. I have checked the "Compile with .net Native tool chain" under project properties
  4. Debug Options > Check "User Managed Compatibility Mode"
  5. Rebooted
  6. Uninstalled VS Community 2017 and reinstalled it
  7. Check for uninstalled updates on the machine

I am working with this on my home wifi network, I am not using OneDrive or any cloud storage. This was working several days ago but I have no restore point prior to the issue. Other than installing all windows updates after the issue was found, and making changes noted above based on thoughts in other threads, no other system changes have been made. I am logged into laptop as an administrator, and have also attempted to run VS "as an administrator", no effect.

I am missing something, any ideas?

VS 2017: How to add ARM target to UWP build package?

$
0
0

Hi-

I'm having trouble understanding / creating a Solution Configuration that targets the ARM platform.

I'm really trying to package an existing app, but since I'm having other issues with that I first want to learn how to enable the ARM target on a BLANK packaging project .

So, if I create a new Windows Universal -> Blank App, ARM and ARM64 are available both under Solution Configuration and the Project context.

However, if I create a new Windows Universal -> Windows Application Packaging Project they are not available. If I then create a new Active Solution Platform, "Create New Project Platform" is greyed out and unchecked. I don't see a way to add the new target under the project in this case.

Correspondingly, the "ARM" checkbox is also greyed out when I try to create an App Package.

There's obviously a gap in my understanding here somewhere but I'm not sure what that might be.

Any pointers?

R

Cannot add my user control to the toolbox

$
0
0

Hi,

I have a problem adding my own user control to the control toolbox. Here is what I did:

- created a separate project in the solution, designed the user control and built it. The access modifier of my class is "public" and it inherits from "UserControl"

- added the control as a project reference to another project in the solution

- rebuild the entire solution, restart Visual studio

Problem:

- the control does not show up in the toolbox. I also tried to add it manually via "Choose items", add ".Net Framework Components", then browsed to dll. I get a message saying "The file <filename> is not valid."

thanks in advance

Holger


Viewing all 21115 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>