我的ASP.NET MVC项目推送到Azure网站,其中包含一个无效的额外DLL.这样可以防止项目正常运行.如果创建了一个新网站,它将完美运行.在本地清理项目并重新部署不能解决问题.有没有办法进行"远程清洁?"
此项目直接从Visual Studio与发布菜单项一起部署.
我的项目现在有一个project.xcworkspace/xcshareddata目录.XCode在project.xcworkspace/xcshareddata目录中存储了什么?
比较两者的最佳(最少代码,最快,最可靠)方法是NSUUIDs什么?
这是一个例子:
-(BOOL)isUUID:(NSUUID*)uuid1 equalToUUID:(NSUUID*)uuid2
{
return ... // YES if same or NO if not same
}
Run Code Online (Sandbox Code Playgroud) 问题是System.Data.Services.Client.dll和Microsoft.Data.Services.Client.dll中都存在一些类(DataServiceClientException/DataServiceRequestException/DataServiceResponse).简单的方法是只使用其中一个库.不幸:
通常这两个库可以很好地协同工作.但是,从此处实现代码以检测并发冲突会导致错误:
Error 1 The type 'System.Data.Services.Client.DataServiceRequestException' exists in both 'C:\Program Files\Microsoft WCF Data Services\5.0\bin\.NETFramework\Microsoft.Data.Services.Client.dll' and 'C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Services.Client.dll'
Error 2 The type 'System.Data.Services.Client.DataServiceResponse' exists in both 'C:\Program Files\Microsoft WCF Data Services\5.0\bin\.NETFramework\Microsoft.Data.Services.Client.dll' and 'C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Services.Client.dll'
Error 3 The type 'System.Data.Services.Client.DataServiceClientException' exists in both 'C:\Program Files\Microsoft WCF Data Services\5.0\bin\.NETFramework\Microsoft.Data.Services.Client.dll' and 'C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Services.Client.dll'
Run Code Online (Sandbox Code Playgroud)
因为System.Data.Services.Client.DataServiceClientException,DataServiceRequestException和DataServiceResponse类都无法访问,因为它们存在于两个库中.在使用Microsoft.WindowsAzure.StorageClient.TableServicesContext时如何检测并发更新冲突?
如果代码将委托分配给NSFetchedResultsController如下:
-(id)initWithFetchedResultsController:(NSFetchedResultsController*)fetchedResultsController
{
self = [super init];
if (self != nil)
{
fetchedResultsController.delegate = self;
_fetchedResultController = fetchedResultsController;
}
return self;
}
Run Code Online (Sandbox Code Playgroud)
该NSFetchedResultsControllerDelegate方法– controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:从未被调用过self:
-(void)controller:(NSFetchedResultsController *)controller
didChangeObject:(id)anObject
atIndexPath:(NSIndexPath *)indexPath
forChangeType:(NSFetchedResultsChangeType)type
newIndexPath:(NSIndexPath *)newIndexPath
{
NSLog(@"Delegate method called"); // Never called
}
Run Code Online (Sandbox Code Playgroud)
谓词没有问题,谓词被分配,并且使用通知直接起作用.
ios ×2
.net ×1
asp.net-mvc ×1
azure ×1
core-data ×1
delegation ×1
deployment ×1
ios7 ×1
nsuuid ×1
objective-c ×1
uuid ×1
xcode ×1
xcode4.5 ×1