I'm trying to connect to CRM using steps declared in this link
https://msdn.microsoft.com/en-us/library/gg695790.aspx
Error
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0012: The type 'System.Data.Services.IUpdatable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Source Error:
Line 192816: /// </summary>
Line 192817: [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "7.0.0000.3543")]
Line 192818: public partial class XrmServiceContextr : Microsoft.Xrm.Client.CrmOrganizationServiceContext
Line 192819: {
Line 192820:
Source File: c:\Users\Gevor\Documents\Visual Studio 2013\Projects\TestCRM\TestCRM\App_Code\Xrm.cs Line: 192818
Command line parameters
c:\DynamicsCRM\SDK\Bin>CrmSvcUtil.exe /out:Xrm.cs
/url:https://Organization/XRMServices/2011/Organization.svc
/domain:DOMAIN /username:USERNAME /password:PASSWORD /namespace:Xrm
/serviceContextName:XrmServiceContextr
/codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization,
Microsoft.Xrm.Client.CodeGeneration"
If System.Data.Services is not the GAC, it neeeds to be merged in your assembly, not only referenced.
You need to add a System.Data.Services reference to your TestCRM application.
Related
I'm using Orchard to build my website and want to add different elements for production environment and test environemnt in the Themes. I tried to use a c# singleton class in Orchard Themes class to get if it is production environment. Then use the singleton class in the cshtml file in Themes. The code can be compiled. But in run time, it will throw exception saying:The name 'Themes' does not exist in the current context. I have to add "Themes" namespace before the class I added. Otherwise, it won't pass compile.
Details:
I added a singleton class: EnvironmentDev.cs file into Themes.csproj file. It contains static GetInstance method and IsProd property.
In Themes.csproj file, it shows:
<ItemGroup>
<Compile Include="EnvironmentDev.cs" />
</ItemGroup>
In Document.cshtml file of Themes, I added following code:
#{
if (Themes.EnvironmentDev.GetInstance().IsProd) {
// Add production element
}
else {
// Add test site element
}
}
Detailed Error message:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'Themes' does not exist in the current context
Source Error:
Line 46: #Display(Model.Head)
Line 47: #{
Line 48: if (Themes.EnvironmentDev.GetInstance().IsProd) {
Line 49: <script src="https://XXXX.js"></script> //using XXXX instead of real link
Line 50: }
Any suggestions would be appreciated.
I think you need to create a dedicated project for your theme with the following command
codegen theme MyTheme /CreateProject:true /IncludeInSolution:true
otherwise your code will not be found. I had the same issue with a resource file.
See paragraph Generating the Theme Structure in the docs for further information.
I'm developing an application using MVC 5 when I run it I got this error
Compilation Error Description: An error occurred during the
compilation of a resource required to service this request. Please
review the following specific error details and modify your source
code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'template'
could not be found (are you missing a using directive or an assembly
reference?)
Source Error:
Line 28:
Line 29:
Line 30: public class _Page_Views_Emergence_Index_cshtml : System.Web.Mvc.WebViewPage<IEnumerable<template.model.emergenceview>> {
Line 31:
Line 32: #line hidden
Source File: d:\local\Temporary ASP.NET
Files\root\9c72e46c\a2166d6c\App_Web_index.cshtml.4574e8d.-zs3j30-.0.cs
Line: 30
This error clearly indicates that you model IEnumerable<template.model.emergenceview> cannot be resolved because template namespace cannot be found. Make sure that namespace is correct(it is case-sensitive) and it wasn't renamed/removed.
In Product display page showing proper image but when I click any product Image it is throw bellow error.
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.
Compiler Error Message: CS1061:
'System.Web.Mvc.HtmlHelper'
does not contain a definition for 'GenerateCaptcha' and no extension
method 'GenerateCaptcha' accepting a first argument of type
'System.Web.Mvc.HtmlHelper'
could be found (are you missing a using directive or an assembly
reference?)
Source Error:
Line 47: {
Line 48: <div class="captcha-box">
Line 49: #Html.Raw(Html.GenerateCaptcha())
Line 50: </div>
Line 51: }
Source File: h:\root\home\raaisoma-001\www\site1\Plugins\SevenSpikes.Nop.Plugins.NopQuickTabs\Views\ProductTab\_ProductReviews.cshtml Line: 49
But When I click on QuickView product display properly.
You're missing appropaite namespace. Add
using Nop.Web.Framework.UI.Captcha;
to this file
I am trying to write an object in my app.config file.
When i reach the following line
windowMain.config.Sections["LayoutSettings"].SectionInformation.SetRawXml("<LayoutSettings>" + XElement.Parse(str).ToString() + "</LayoutSettings>");
There is no error in the XElement.Parse(str).ToString(), it is having correct value.
windowMain.config.Sections["LayoutSettings"] is shown null, however the count of the sections is shown one,...but already there is a config section and section name Layout Settings in it.
The following exception is thrown:
An error occurred creating the configuration section handler for LayoutSettings: Could not load file or assembly 'Sigma' or one of its dependencies.
My app.config has the following code in the configsection:
<section name="LayoutSettings" type="Sigma.Modules.ParentWindowState, Sigma" />
I have checked the type of the section , its correct, but unable to get the problem and get the above exception.
I'm attempting to build a library (Medsphere.Widgets) on Ubuntu, and it's throwing me an error. I've had a good search around, but nobody seems to have an answer for it. The configure script works fine, and completes with no warnings or errors. When I go to run the make, it does this:
polynomial#ubuntu:~/Projects/Medsphere/$ make
Making all in src
make[1]: Entering directory `/home/polynomial/Projects/Medsphere/src'
/usr/bin/mcs /target:library /out:Medsphere.Widgets.dll -r:/usr/lib/pkgconfig/../../lib/cli/pango-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/atk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gdk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/glib-sharp-2.0/glib-sharp.dll -r:/usr/lib/mono/2.0/Mono.Cairo.dll ./CPaned.cs ./FBox.cs ./GridView.cs ./CairoHelper.cs ./IconLayout.cs ./ICairoCellRenderer.cs ./BoxCellRenderer.cs ./PixbufCellRenderer.cs ./TextCellRenderer.cs ./graph/AxisLocation.cs ./graph/AxisSizeGroup.cs ./graph/BaseTreeModelPlot.cs ./graph/DateTimeAxis.cs ./graph/EventPlot.cs ./graph/Graph2D.cs ./graph/Graph.cs ./graph/GtkStyleProvider.cs ./graph/HistogramPlot.cs ./graph/IAxis.cs ./graph/IPlot.cs ./graph/IStyleProvider.cs ./graph/ITreeModelPlot.cs ./graph/LabelAxis.cs ./graph/Legend.cs ./graph/LinearAxis.cs ./graph/LinePlot.cs ./graph/LinkedLinePlot.cs ./graph/PlotColor.cs ./graph/PointShape.cs ./graph/ReferenceRangePlot.cs
./IconLayout.cs(414,25): error CS0029: Cannot implicitly convert type `Cairo.Context' to `Cairo.Context'
./IconLayout.cs(414,25): The type `Cairo.Context' has two conflicting definitions, one comes from `Mono.Cairo, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' and the other from `Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' (in the previous error)
Internal(1,1): The type `Cairo.Context' has two conflicting definitions, one comes from `Mono.Cairo, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' and the other from `Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' (in the previous error)
./IconLayout.cs(920,41): error CS1502: The best overloaded method match for `Gdk.CairoHelper.SetSourceColor(Cairo.Context, Gdk.Color)' has some invalid arguments
/usr/lib/cli/gdk-sharp-2.0/gdk-sharp.dll (Location of the symbol related to previous error)
./IconLayout.cs(920,41): error CS1503: Argument `#1' cannot convert `Cairo.Context' expression to type `Cairo.Context'
./IconLayout.cs(920,41): (equally named types possibly from different assemblies in previous error)
/usr/lib/mono/gac/Mono.Cairo/2.0.0.0__0738eb9f132ed756/Mono.Cairo.dll (Location of the symbol related to previous error)
/usr/lib/mono/gac/Mono.Cairo/1.0.5000.0__0738eb9f132ed756/Mono.Cairo.dll (Location of the symbol related to previous error)
Compilation failed: 3 error(s), 0 warnings
I can only imagine that two versions of Cairo are conflicting, but I can't figure out how to fix it. Any ideas?
Just to clear this one up:
I modified config.status to use gmcs rather than just mcs and patched all Mono.Cairo references so that they point at the version-specific DLL, rather than the generic one in the GAC. After patching a couple of cast bugs in the lib, it works great!