Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Create new contact with Visual Studio (without Plugin)

Posted on by Microsoft Employee

Hello everyone.

I basically wanted to Import an XML with contacts in it to CRM with Visual Studios. Well since Im a beginner it is alot more difficult than I thought. So I wanted to take it a Little bit slower.

How do I create a new contact with "firstname", "lastname" and "email" with Visual Studio. Without making a Plugin.

*This post is locked for comments

  • Verified answer
    SCV Profile Picture
    SCV 1,004 on at
    RE: Create new contact with Visual Studio (without Plugin)

    You need to change the target framework to .NET Framework 4.5.2. (right click on your project in Visual Studio-> click properties-> in the Application Tab set the Target Framework to 4.5.2)

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: Create new contact with Visual Studio (without Plugin)

    Technically, you could do it by using SQL Server Integration Services (SSIS) from inside Visual Studio.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Create new contact with Visual Studio (without Plugin)

    Hey, thanks again.

    Im on the next Problem Right now. I´ve been Looking for a solution for the last minutes and havent found anything yet. When trying to install the xrmtooling.coreassembly I get this message:

    Install-Package : Could not install package 'Microsoft.CrmSdk.CoreAssemblies 9.0.2.3'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any

    assembly references or content files that are compatible with that framework. For more information, contact the package author.

    At line:1 char:1

    + Install-Package Microsoft.CrmSdk.XrmTooling.CoreAssembly -Version 9.0 ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

       + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException

       + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Create new contact with Visual Studio (without Plugin)

    That's all about adding correct assembly references - System.Configuration in your case (and you'll have to make sure you have CRM connection string in the configuration file). You'll also have to add XrmTooling nuget package for XRM: www.nuget.org/.../Microsoft.CrmSdk.XrmTooling.CoreAssembly

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Create new contact with Visual Studio (without Plugin)

    Hey. Thanks for the quick answer.

    It seems Im still missing something. Tried to do what has been done in the link.

    I have an error here:

    "CrmServiceClient crmConn = new CrmServiceClient(ConfigurationManager.ConnectionStrings["CRM"].ConnectionString);"

    ConfigurationManager does not exist in the current context.

  • Verified answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Create new contact with Visual Studio (without Plugin)

    You can't do it with the Visual Studio - you have to develop something, be it a plugin or an executable application

    Here is an example:

    community.dynamics.com/.../simple-dynamics-crm-console-application

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans