After updating 'Microsoft.ApplicationInsights' from 2.4.0 to 2.5.1
and it installing implicitly following packages
1.'Microsoft.ApplicationInsights.Agent.Intercept'
2.'Microsoft.ApplicationInsights.DependencyCollector'
3.'Microsoft.ApplicationInsights.PerfCounterCollector'
4.'Microsoft.ApplicationInsights.WindowsServer'
5.'Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel'
and error is coming on this line of code
config.LoggerFactory = loggerFactory.AddApplicationInsights("", filter.Filter);
Could not load type 'Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings' from assembly 'Microsoft.AI.ServerTelemetryChannel', Version=2.5.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Related
i use Unity version 2020.1.11f1
I am trying to create Docs using the Xceed library. However, every time I mention Color, I get the following error :
error CS0012: The type 'Color' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
example code:
s1.Color = Color.red;
s1.Bind( brazil, "Category", "Expenses" );
c.AddSeries( s1 );
I tried to use this : [System.ComponentModel.TypeConverter("System.Drawing.Color, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
along with this code:
s1.Color = System.Drawing.Color.Green;
and now the error looks like this:
error CS1069: The type name 'Color' could not be found in the namespace 'System.Drawing'. This type has been forwarded to assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Consider adding a reference to that assembly.
The solution was that the Xceed bundle had lost its reference to the System.Drawning.Color library or could not pull it up. When adding the library to the directory, the problem was solved.
My project stopped working. I have the newest version of all nugets and appium server. Where is a problem? I receive error like this:
Message:
OneTimeSetUp: System.TypeLoadException : Method 'Dispose' in type 'OpenQA.Selenium.Appium.Service.AppiumCommandExecutor' from assembly 'appium-dotnet-driver, Version=3.0.0.2, Culture=neutral, PublicKeyToken=null' does not have an implementation.**
protected AppiumDriver<AppiumWebElement> driver = null;
private DesiredCapabilities dc = new DesiredCapabilities();
public Driver()
{
dc.SetCapability("reportDirectory", reportDirectory);
dc.SetCapability("reportFormat", reportFormat);
dc.SetCapability("testName", testName);
dc.SetCapability("deviceName", AppConfigReader.DEVICE_NAME);
dc.SetCapability("language", "en");
dc.SetCapability("locale", "UK");
dc.SetCapability("newCommandTimeout", 120);
//dc.SetCapability("automationName", "UiAutomator2");
dc.SetCapability(MobileCapabilityType.Udid, AppConfigReader.DEVICE_NAME);
dc.SetCapability(AndroidMobileCapabilityType.AppPackage, AppConfigReader.APPLICATION_NAME);
dc.SetCapability(AndroidMobileCapabilityType.AppActivity, "novacura.flow.client.android.SplashScreen");
driver = new AndroidDriver<AppiumWebElement>(new Uri(AppConfigReader.HOST), dc);
}
OneTimeSetUp: System.TypeLoadException : Method 'Dispose' in type 'OpenQA.Selenium.Appium.Service.AppiumCommandExecutor' from assembly 'appium-dotnet-driver, Version=3.0.0.2, Culture=neutral, PublicKeyToken=null' does not have an implementation.*
got resolve by downgrading the selenium NuGet package to 3.11.2
yes, the above problem is resolved after downgrading selenium Nuget package to 3.11.2
I'm converting to VS2017 a legacy project which uses a database connection dialog to collect data to format a connection string.
This line below is triggering an error:
var dialog = new DataConnectionDialog();
Could not load file or assembly 'Microsoft.Data.ConnectionUI,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=f4ca07f51760da93' or
one of its dependencies. The system cannot find the file specified.:
System.IO.FileNotFoundException: Could not load file or assembly
'Microsoft.Data.ConnectionUI, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=f4ca07f51760da93' or one of its dependencies. The
system cannot find the file specified. File name:
'Microsoft.Data.ConnectionUI, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=f4ca07f51760da93' at
Microsoft.Data.ConnectionUI.DataConnectionDialog..ctor() at
Wings4CloudPackage.Forms.frmNewSolution.btnDatabase_Click(Object
sender, EventArgs e)
=== Pre-bind state information === LOG: DisplayName = Microsoft.Data.ConnectionUI, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=f4ca07f51760da93 (Fully-specified) LOG: Appbase =
file:///C:/Program Files (x86)/Microsoft Visual
Studio/2017/Enterprise/Common7/IDE/ LOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.Data.ConnectionUI.Dialog,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=f4ca07f51760da93.
=== LOG: This bind starts in LoadFrom load context. WRN: Native image will not be probed in LoadFrom context. Native image will only be
probed in default load context, like with Assembly.Load().
I have checked this path: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/ and the referenced Microsoft.Data.ConnectionUI.dll is there.
This project uses the following nuget package to show the dialog: DataConnectionDialog (https://www.nuget.org/packages/DataConnectionDialog/1.1.0)
This code works in VS2013, but not in VS2017.
For me in VS 2017 in WPF app works this:
DataConnectionDialog dcd = new DataConnectionDialog();
DataProvider dataProviderSql = DataProvider.SqlDataProvider;
DataSource dataSourceSql = new DataSource(dataProviderSql.Name, dataProviderSql.DisplayName);
dataSourceSql.Providers.Add(dataProviderSql);
DataProvider dataProviderOracle = DataProvider.OracleDataProvider;
DataSource dataSourceOracle = new DataSource(dataProviderOracle.Name, dataProviderOracle.DisplayName);
dataSourceOracle.Providers.Add(dataProviderOracle);
DataProvider dataProviderOle = DataProvider.OleDBDataProvider;
DataSource dataSourceOle = new DataSource(dataProviderOle.Name, dataProviderOle.DisplayName);
dataSourceOle.Providers.Add(dataProviderOle);
DataProvider dataProviderOdbc = DataProvider.OdbcDataProvider;
DataSource dataSourceOdbc = new DataSource(dataProviderOdbc.Name, dataProviderOdbc.DisplayName);
dataSourceOdbc.Providers.Add(dataProviderOdbc);
dcd.DataSources.Add(dataSourceSql);
dcd.DataSources.Add(dataSourceOracle);
dcd.DataSources.Add(dataSourceOle);
dcd.DataSources.Add(dataSourceOdbc);
dcd.SelectedDataSource = dataSourceSql;
dcd.SelectedDataProvider = dataProviderSql;
if (DataConnectionDialog.Show(dcd) == System.Windows.Forms.DialogResult.OK)
{
System.Windows.MessageBox.Show("YES");
}
I have an MVC project that has been working for years that I just re-published to the server yesterday. I opened it up to debug and make changes to code. Some time in between compiles, something happened and now the build fails complaining that
The type 'System.Windows.FrameworkElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
and
The type 'System.Windows.DependencyObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
I have looked at similar questions and done as they have suggested to make sure all files are set to the Build Action compile, content or none for the project. I didn't add any new files and I didn't copy paste any images into solution.
Any ideas?
Edit:
Not sure if this will be helpful. I didn't include it because it doesn't seem like it would be, but this is where it takes me when I double click on the errors given.
public PartialViewResult GetByJobID(int jobID)
{
ViewBag.Jobid = jobID;
var getAllHolesByJobID = _toolCalloutService.getAllJobHoles(jobID);
var toolOrderHoleViewModels = //error happens here on var
getAllHolesByJobID.Select(Mapper.Map<HoleInfoViewModel, ToolOrderHoleViewModel>).ToList();
var shipOrigins = _toolCalloutService.GetDistricts();
ViewData["ToolOrderHoleViewModels"] = toolOrderHoleViewModels;
ViewData["ShipOrigins"] = shipOrigins;
ViewData["OrderedBy"] = System.Web.HttpContext.Current.User.Identity.Name.Substring(9);
return PartialView("~/Views/ToolCallout/ToolCallout.cshtml");
}
It just highlights the var keyword at var toolOrderHoleViewModels.
I have retrycode Logic outside of my application which Loads the Assemblies using Assembly.LoadFile(Asmpath);
and returns the object from the loaded assembly back to the my application.
and i have the reference to the same assembly in app. which i have created using Add Refferences.
i am able to return the object. but while casting the returned object to its type in my application its throwing the following Error:
[A]SampleAssembly1.Class1 cannot be cast to [B]SampleAssembly1.Class1. Type A originates from 'SampleAssembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadNeither' at location 'C:\Users\v-saabdu\Desktop\Final Code for RetryMethod\ReflectionSamples\SampleAssembly1\bin\Debug\SampleAssembly1.dll'. Type B originates from 'SampleAssembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\Users\v-saabdu\Desktop\Final Code for RetryMethod\ReflectionSamples\ReflectionAssembly\bin\Debug\SampleAssembly1.dll'.
from the above error message I understood that the way assemblies are loaded in my application and in retrycode (outside of my app) differning in context.
can any one suggest me solution for this..
Thankx,
Assembly assembly = Assembly.LoadFile("Libtest.dll");
TestLib lib = (TestLib)assembly.CreateInstance("Lib");
lib.doSomething();
Lib class must implement the TestLib interface and must be accessible both from both Foo.dll and bar.dll.